From: Andy Belle-Isle Date: Sat, 7 Sep 2019 05:15:19 +0000 (-0400) Subject: Player init script can now allow the player to jump X-Git-Tag: v0.2-alpha~31 X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=9037f0ae5aab24641caa299a4743b03e0094bdbb;p=clyne%2Fgamedev2.git Player init script can now allow the player to jump --- diff --git a/Scripts/init.lua b/Scripts/init.lua index 6f510c1..1292ba1 100644 --- a/Scripts/init.lua +++ b/Scripts/init.lua @@ -14,6 +14,13 @@ bird = { end, MoveRightReleased = function(self) self.Velocity.x = self.Velocity.x - 100 + end, + JumpKeyPressed = function(self) + if self.Physics.standing == true then + self.Velocity.y = self.Velocity.y + 210 + end + end, + JumpKeyReleased = function(self) end }, Position = { @@ -24,6 +31,7 @@ bird = { x = 0.0, y = 0.0 }, + Physics = 0, Name = "bord", hellotrue = true, hellofalse = false,