examples/plateformer: make the player able to jump

This commit is contained in:
Kazhnuz 2019-05-02 20:10:41 +02:00
parent 0d5068fdaa
commit 977a735608

View file

@ -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