remove items_manager and make honeydew searching tied to a position
This commit is contained in:
@@ -32,7 +32,7 @@ func _ready() -> void:
|
||||
item_bones.append(skeleton.find_bone(ITEM_BONE_NAME + str(i)))
|
||||
gathering.initialize(anthill, skeleton, item_bones, MAX_CARRY, 0.4, 1)
|
||||
gathering.target_set.connect(_on_gathering_target_set)
|
||||
gathering.stop_gathering.connect(_on_gathering_stop)
|
||||
gathering.stopped_gathering.connect(_on_stopped_gathering)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
@@ -47,7 +47,7 @@ func _process(delta: float) -> void:
|
||||
func _interact(with: Interactable) -> void:
|
||||
if with is Honeydew:
|
||||
state = AntGathererState.GATHERING
|
||||
gathering.go_gather(with as Honeydew)
|
||||
gathering.start_gathering(with as Honeydew)
|
||||
|
||||
|
||||
func _handle_wandering(delta: float) -> void:
|
||||
@@ -67,7 +67,7 @@ func _on_moving_ended() -> void:
|
||||
|
||||
func _on_moving_started() -> void:
|
||||
if state == AntGathererState.GATHERING:
|
||||
gathering.stop_all_gathering()
|
||||
gathering.stop_gathering()
|
||||
state = AntGathererState.MOVING
|
||||
|
||||
|
||||
@@ -78,5 +78,5 @@ func _on_gathering_target_set(pos: Vector3) -> void:
|
||||
nav_agent.set_target_position(pos)
|
||||
|
||||
|
||||
func _on_gathering_stop() -> void:
|
||||
func _on_stopped_gathering() -> void:
|
||||
state = AntGathererState.WANDERING
|
||||
|
||||
Reference in New Issue
Block a user