From 9037f0ae5aab24641caa299a4743b03e0094bdbb Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sat, 7 Sep 2019 01:15:19 -0400 Subject: Player init script can now allow the player to jump --- Scripts/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- cgit v1.2.3