fix lvel display

This commit is contained in:
mehbark 2026-09-07 22:32:07 -04:00
parent 7c6aced9ca
commit 156bb0d941

View file

@ -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.custom_step(413)
last_move_tween.kill() last_move_tween.kill()
tween.tween_property(self, "position", target_pos(), anim_time) tween.tween_property(self, "position", target_pos(), anim_time)
tween.tween_callback(func(): lvel_displayed = lvel)
last_move_tween = tween last_move_tween = tween
func lpos_of_pos(pos: Vector3) -> Vector2i: 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) var on_ice := !!board.type_at(lpos, Piece.Type.FloorIce)
if not on_ice: if not on_ice:
lvel -= move lvel -= move
lvel_displayed = lvel
tween_to_target(tween) tween_to_target(tween)
func undo_step() -> Callable: func undo_step() -> Callable: