summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--not/Hero.lua5
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