mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-22 08:04:23 +00:00
Move logging statements to separate signals
This commit is contained in:
parent
c3bdc1c653
commit
edbbd130dc
1 changed files with 7 additions and 2 deletions
|
@ -15,12 +15,17 @@ func _on_detection_area_body_entered(body: Node2D) -> void:
|
|||
var edibles: Array = body.find_children("Edible", "Edible", false, false)
|
||||
for edible in edibles:
|
||||
if edible.tag == tag:
|
||||
Log.p(self, "Tracking a new target: %s" % body)
|
||||
possible_targets.push_back(body)
|
||||
tracked.emit(body)
|
||||
|
||||
func _on_detection_area_body_exited(body: Node2D) -> void:
|
||||
if body in possible_targets:
|
||||
Log.p(self, "Not tracking anymore target: %s" % body)
|
||||
possible_targets.erase(body)
|
||||
untracked.emit(body)
|
||||
|
||||
|
||||
func _on_tracked(body: Node2D) -> void:
|
||||
Log.p(self, "Tracking a new target: %s" % body)
|
||||
|
||||
func _on_untracked(body:Node2D) -> void:
|
||||
Log.p(self, "Not tracking anymore target: %s" % body)
|
||||
|
|
Loading…
Reference in a new issue