Skip to content
Snippets Groups Projects
Commit d790ae11 authored by dg's avatar dg
Browse files

smooth move on boot screen too

git-svn-id: http://svn.net-core.org/repos/t-engine4@2209 51575b47-30f0-44d4-a5cc-537603b46e54
parent 6f8e8a41
No related branches found
No related tags found
No related merge requests found
......@@ -81,12 +81,19 @@ function _M:act()
end
function _M:move(x, y, force)
local ox, oy = self.x, self.y
local moved = false
if force or self:enoughEnergy() then
moved = engine.Actor.move(self, x, y, force)
if not force and moved and not self.did_energy then self:useEnergy() end
end
self.did_energy = nil
if moved and not force and ox and oy and (ox ~= self.x or oy ~= self.y) then
self:setMoveAnim(ox, oy, 3)
end
return moved
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment