How to make a player jump (set it's y velocity)?
问题 Given the following: integralB :: Num a => Behavior t a -> Behavior t a -- definite integral of a behaviour eJump :: Event t a -- tells the player to jump bYAccel = pure 4000 -- y acceleration bYVel = integralB bYAccel -- y velocity bY = integralB bYVel -- y position How do I make the player jump (probably by setting its y velocity) when a jump event arrives? 回答1: You'll need to be able to apply an impulse to the Y velocity for the jump. From your own answer, you've come up with a way to do