less confusing undo animation
This commit is contained in:
parent
66314ebe4c
commit
bf4739f238
1 changed files with 3 additions and 0 deletions
3
piece.gd
3
piece.gd
|
|
@ -94,6 +94,9 @@ func do_move(move: Vector2i) -> Callable:
|
|||
func undo_move() -> Callable:
|
||||
var old_pos := lpos
|
||||
return func():
|
||||
for tween in tweens:
|
||||
tween.kill()
|
||||
position = target_pos()
|
||||
lpos = old_pos
|
||||
tween_to_target()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue