This commit is contained in:
2026-02-02 08:34:04 +08:00
parent d6c84dd30d
commit 9201c99d42
3 changed files with 113 additions and 17 deletions
+5 -1
View File
@@ -1046,8 +1046,12 @@ func start_movement_along_path(path: Array, clear_visual: bool = true):
tween.set_trans(Tween.TRANS_LINEAR)
tween.set_ease(Tween.EASE_IN_OUT)
var step_duration = 0.25
if movement_manager:
step_duration = step_duration / movement_manager.speed_multiplier
for point in path:
tween.tween_property(self, "position", grid_to_world(Vector2i(point.x, point.y)), 0.25)
tween.tween_property(self, "position", grid_to_world(Vector2i(point.x, point.y)), step_duration)
tween.tween_callback(func():
current_position = Vector2i(path[-1].x, path[-1].y)