From 7ad366dcec68c703499e3f6f72b345d1adeac1da Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 17 Jul 2017 14:15:36 +0200 Subject: Moved landing method to Hero from World --- not/World.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'not/World.lua') diff --git a/not/World.lua b/not/World.lua index 3a5b051..47a1237 100644 --- a/not/World.lua +++ b/not/World.lua @@ -332,13 +332,7 @@ function World.beginContact (a, b, coll) if a:getCategory() == 1 then local x,y = coll:getNormal() if y < -0.6 then - -- TODO: move landing to `not.Hero` - -- Move them to Hero - b:getUserData().inAir = false - b:getUserData().jumpCounter = 2 - b:getUserData().salto = false - b:getUserData().smoke = false - b:getUserData():createEffect("land") + b:getUserData():land() end local vx, vy = b:getUserData().body:getLinearVelocity() if math.abs(x) == 1 or (y < -0.6 and x == 0) then -- cgit v1.1