diff options
author | Aki <nthirtyone@gmail.com> | 2018-04-09 01:48:55 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2018-04-09 01:48:55 +0200 |
commit | 5ce7f80fcdbc16ed74d56865df3114a800b3788d (patch) | |
tree | 38d788fcba6992de8fdda801ec31c42f6660605a /not/Hero.lua | |
parent | d900efc15b373d065666f891851085d70ec52667 (diff) | |
download | roflnauts-5ce7f80fcdbc16ed74d56865df3114a800b3788d.zip roflnauts-5ce7f80fcdbc16ed74d56865df3114a800b3788d.tar.gz roflnauts-5ce7f80fcdbc16ed74d56865df3114a800b3788d.tar.bz2 |
Walking animation start fires now inside Hero's onWalkingStarted
Diffstat (limited to 'not/Hero.lua')
-rw-r--r-- | not/Hero.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/not/Hero.lua b/not/Hero.lua index 37e61c0..650eed4 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -169,7 +169,11 @@ end --- Called each time Hero starts walking. -- Is not called when only direction of walking is changed. function Hero:onWalkingStarted () - + if (self.current ~= self.animations.attack) and + (self.current ~= self.animations.attack_up) and + (self.current ~= self.animations.attack_down) then + self:setAnimation("walk") + end end function Hero:onJump () |