diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-03 20:13:41 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-03 20:13:41 -0400 |
commit | 599c5702e3a5f951630d02dc027ff4b31599d955 (patch) | |
tree | e48e2328005362b4623540eef0153bb19c19a7f2 | |
parent | cff6ba0a316f6f23852f7451adaade8454b6592f (diff) |
Script now flips player when they go left
-rw-r--r-- | Scripts/init.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua index d1f108c..a57e8b3 100644 --- a/Scripts/init.lua +++ b/Scripts/init.lua @@ -3,12 +3,14 @@ bird = { EventListeners = { MoveLeftPressed = function(self) self.Velocity.x = self.Velocity.x - 100 + self.Render.flipx = true; end, MoveLeftReleased = function(self) self.Velocity.x = self.Velocity.x + 100 end, MoveRightPressed = function(self) self.Velocity.x = self.Velocity.x + 100 + self.Render.flipx = false; end, MoveRightReleased = function(self) self.Velocity.x = self.Velocity.x - 100 |