refactor ControlledUnit

This commit is contained in:
2024-10-13 21:41:12 +10:00
parent bdf05d5479
commit 58a231d02a
3 changed files with 16 additions and 20 deletions

View File

@@ -23,7 +23,7 @@ func _ready() -> void:
assert(gathering != null, "gathering missing!")
super._ready()
moving_started.connect(_on_moving_started)
moving_ended.connect(_on_moving_ended)
moving_finished.connect(_on_moving_ended)
nav_agent.navigation_finished.connect(gathering.on_nav_agent_navigation_finished)
var item_bones: Array[int] = []
for i in MAX_CARRY:
@@ -34,7 +34,7 @@ func _ready() -> void:
func _process(delta: float) -> void:
super._process(delta)
if _is_relocating:
if _is_moving:
state = State.MOVING
_handle_wandering(delta)