diff --git a/piece.gd b/piece.gd index ff92d12..a394704 100644 --- a/piece.gd +++ b/piece.gd @@ -28,6 +28,7 @@ func tween_to_target(tween := get_tree().create_tween(), anim_time: float = get_ last_move_tween.custom_step(413) last_move_tween.kill() tween.tween_property(self, "position", target_pos(), anim_time) + tween.tween_callback(func(): lvel_displayed = lvel) last_move_tween = tween func lpos_of_pos(pos: Vector3) -> Vector2i: @@ -68,7 +69,6 @@ func do_step(board: Board, tween: Tween): var on_ice := !!board.type_at(lpos, Piece.Type.FloorIce) if not on_ice: lvel -= move - lvel_displayed = lvel tween_to_target(tween) func undo_step() -> Callable: