examples/plateformer: make the player able to jump
This commit is contained in:
parent
0d5068fdaa
commit
977a735608
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ end
|
|||
function Player:update(dt)
|
||||
self.xfrc = 480*3
|
||||
|
||||
if self.keys["up"].isDown then
|
||||
--self.ysp = -120
|
||||
if self.keys["up"].isPressed and (self.onGround) then
|
||||
self.ysp = -280
|
||||
end
|
||||
if self.keys["down"].isDown then
|
||||
--self.ysp = 120
|
||||
|
|
Loading…
Reference in a new issue