From: Andy Belle-Isle Date: Wed, 4 Sep 2019 00:13:41 +0000 (-0400) Subject: Script now flips player when they go left X-Git-Tag: v0.2-alpha~40 X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=599c5702e3a5f951630d02dc027ff4b31599d955;p=clyne%2Fgamedev2.git Script now flips player when they go left --- 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