Commit d790ae11b5499ae6c3d1dcf6ec3457dd79a361d2
1 parent
6f8e8a41
smooth move on boot screen too
git-svn-id: http://svn.net-core.org/repos/t-engine4@2209 51575b47-30f0-44d4-a5cc-537603b46e54
Showing
1 changed file
with
7 additions
and
0 deletions
... | ... | @@ -81,12 +81,19 @@ function _M:act() |
81 | 81 | end |
82 | 82 | |
83 | 83 | function _M:move(x, y, force) |
84 | + local ox, oy = self.x, self.y | |
84 | 85 | local moved = false |
86 | + | |
85 | 87 | if force or self:enoughEnergy() then |
86 | 88 | moved = engine.Actor.move(self, x, y, force) |
87 | 89 | if not force and moved and not self.did_energy then self:useEnergy() end |
88 | 90 | end |
89 | 91 | self.did_energy = nil |
92 | + | |
93 | + if moved and not force and ox and oy and (ox ~= self.x or oy ~= self.y) then | |
94 | + self:setMoveAnim(ox, oy, 3) | |
95 | + end | |
96 | + | |
90 | 97 | return moved |
91 | 98 | end |
92 | 99 | ... | ... |
-
Please register or login to post a comment