add code to: (1) draw platform (shell.sml), (2) fix wall collision detection regression and platform collision detection bug (I was meant to pass one y parameter and one x parameter to the QuadTree for querying, but accidentally sent the y coordinate twice), (3) perform necessary state transitions that allow to drop from platform when pressing down on a platform, and (4) make sure player does not stick to platform if they jump to platform from below
This commit is contained in:
@@ -159,8 +159,10 @@ struct
|
||||
|
||||
val game = GameUpdate.update (game, input)
|
||||
|
||||
val wallVec = Wall.getDrawVec (#walls game, width, height)
|
||||
val playerVec = Player.getDrawVec (#player game, width, height)
|
||||
val wallVec = Wall.getDrawVec (#walls game, width, height)
|
||||
val platVec = Platform.getDrawVec (#platforms game, width, height)
|
||||
val wallVec = Vector.concat [wallVec, platVec]
|
||||
|
||||
val shellState = uploadWall (shellState, wallVec)
|
||||
val shellState = uploadPlayer (shellState, playerVec)
|
||||
|
||||
Reference in New Issue
Block a user