diff --git a/examples/gameplay/moveplayer/actors/player.lua b/examples/gameplay/moveplayer/actors/player.lua index 9877bff..a752c38 100644 --- a/examples/gameplay/moveplayer/actors/player.lua +++ b/examples/gameplay/moveplayer/actors/player.lua @@ -7,7 +7,7 @@ function Player:new(world, x, y, id) end -function Player:update(dt) +function Player:updateStart(dt) self.xfrc, self.yfrc = 480*3, 480*3 if self.keys["up"].isDown then @@ -22,8 +22,6 @@ function Player:update(dt) if self.keys["right"].isDown then self.xsp = 120 end - - Player.super.update(self, dt) end function Player:draw() diff --git a/examples/gameplay/plateform/actors/player.lua b/examples/gameplay/plateform/actors/player.lua index 86f7a30..2f18947 100644 --- a/examples/gameplay/plateform/actors/player.lua +++ b/examples/gameplay/plateform/actors/player.lua @@ -8,7 +8,7 @@ function Player:new(world, x, y, id) self:setYGravity(480) end -function Player:update(dt) +function Player:updateStart(dt) self.xfrc = 480*3 if self.keys["up"].isPressed and (self.onGround) then @@ -31,8 +31,9 @@ function Player:update(dt) end self:setDirection(self.xsp) +end - Player.super.update(self, dt) +function Player:updateEnd(dt) self:setAnimation() end