From deff3534c8602c9baeaaa05a044cb35179679aa3 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 16 Apr 2024 00:16:57 +0200 Subject: [PATCH] Add debug logging on `Edible.eaten` --- behaviours/edible.gd | 3 +++ behaviours/edible.tscn | 2 ++ 2 files changed, 5 insertions(+) diff --git a/behaviours/edible.gd b/behaviours/edible.gd index 88bc469..5926b07 100644 --- a/behaviours/edible.gd +++ b/behaviours/edible.gd @@ -14,3 +14,6 @@ signal eaten func eat(): eaten.emit() + +func _on_eaten() -> void: + Log.p(self, "Got eaten.") diff --git a/behaviours/edible.tscn b/behaviours/edible.tscn index d8fa24f..5a4b405 100644 --- a/behaviours/edible.tscn +++ b/behaviours/edible.tscn @@ -4,3 +4,5 @@ [node name="Edible" type="Node"] script = ExtResource("1_l6vtr") + +[connection signal="eaten" from="." to="." method="_on_eaten"]