From 3b3ae3e6904bab30922e3f2d509dec2dbf998f2a Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 13 Oct 2019 17:49:44 +0200 Subject: [PATCH] improvement(game/world): remove non-supported actions --- .../game/modules/world/actors/player.lua | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/sonic-radiance.love/game/modules/world/actors/player.lua b/sonic-radiance.love/game/modules/world/actors/player.lua index 2e7cfbe..68a2b0b 100644 --- a/sonic-radiance.love/game/modules/world/actors/player.lua +++ b/sonic-radiance.love/game/modules/world/actors/player.lua @@ -19,44 +19,30 @@ end function Player:updateStart(dt) self.xfrc, self.yfrc = 480*3, 480*3 - if self.keys["up"].isDown and (self.action ~= "punching") then + if self.keys["up"].isDown then self.ysp = -160 end - if self.keys["down"].isDown and (self.action ~= "punching") then + if self.keys["down"].isDown then self.ysp = 160 end - if self.keys["left"].isDown and (self.action ~= "punching") then + if self.keys["left"].isDown then self.xsp = -160 end - if self.keys["right"].isDown and (self.action ~= "punching") then + if self.keys["right"].isDown then self.xsp = 160 end - if self.keys["A"].isDown and (self.onGround) and (self.action ~= "punching") then + if self.keys["A"].isDown and (self.onGround) then self.zsp = 280*1.33 end if self.keys["B"].isPressed and (self.onGround) then - self.action = "punching" - --self.xsp = 0 - --self.ysp = 0 - - if self:getCurrentAnimation() == "hit1" then - self:changeAnimation("hit2", true) - elseif self:getCurrentAnimation() == "hit2" then - self:changeAnimation("hit3", true) - elseif self:getCurrentAnimation() == "hit3" then - --self:changeAnimation("hit1", true) - else - self:changeAnimation("hit1", true) - end + -- Nothing for the moment end end function Player:animationEnded(name) - if (name == "hit1") or (name == "hit2") or (name == "hit3") then - self.action = "normal" - end + end function Player:updateEnd(dt)