update
This commit is contained in:
+5
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user