diff options
Diffstat (limited to 'not/Hero.lua')
-rw-r--r-- | not/Hero.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/not/Hero.lua b/not/Hero.lua index 014eeb2..ff07c36 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -219,6 +219,15 @@ function Hero:createEffect (name, dx, dy) self.world:createEffect(name, x, y) end +-- Called by World when Hero starts contact with Platform (lands). +function Hero:land () + self.inAir = false + self.jumpCounter = 2 + self.salto = false + self.smoke = false + self:createEffect("land") +end + -- Creates temporary fixture for hero's body that acts as sensor. -- direction: ("left", "right", "up", "down") -- Sensor fixture is deleted after time set in UserData[1]; deleted by `not.Hero.update`. |