diff options
author | Aki <nthirtyone@gmail.com> | 2017-04-03 19:38:59 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-04-03 19:38:59 +0200 |
commit | eed0553c2f005c439a028d56d82756828e75c2ac (patch) | |
tree | c0c360cb9d93cf8b23de7aaf4feda6d4ebeeaafc | |
parent | f6e0b0b7da519c610e049cdf8163d86230b7d383 (diff) | |
download | roflnauts-eed0553c2f005c439a028d56d82756828e75c2ac.zip roflnauts-eed0553c2f005c439a028d56d82756828e75c2ac.tar.gz roflnauts-eed0553c2f005c439a028d56d82756828e75c2ac.tar.bz2 |
Hero use direct parent's update rather than distant relative's one
-rw-r--r-- | not/Hero.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/not/Hero.lua b/not/Hero.lua index e81f10c..f77e5cb 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -52,7 +52,7 @@ end -- Initializator of `Hero`. function Hero:init (name, world, x, y) - -- Find imagePath basing on hero name and call super initializator. + -- Find imagePath based on hero name. local fileName = name or Hero.name -- INITIAL from metatable local imagePath = string.format("assets/nauts/%s.png", fileName) -- `PhysicalBody` initialization. @@ -87,6 +87,7 @@ end function Hero:update (dt) -- hotfix? for destroyed bodies if self.body:isDestroyed() then return end + PhysicalBody.update(self, dt) -- locals local x, y = self.body:getLinearVelocity() local isDown = Controller.isDown @@ -143,8 +144,6 @@ function Hero:update (dt) end end - Sprite.update(self, dt) - -- # DEATH -- We all die in the end. local m = self.world.map |