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"]