From 517d903e9c291806e6cbf30e99712d7e67b0802f Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Sun, 6 Apr 2025 21:05:39 -0600 Subject: [PATCH] GunkNode has distinct destroy & collect methods --- src/world/gunk_node/gunk_node.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/world/gunk_node/gunk_node.gd b/src/world/gunk_node/gunk_node.gd index 228a494..5f6c074 100644 --- a/src/world/gunk_node/gunk_node.gd +++ b/src/world/gunk_node/gunk_node.gd @@ -41,7 +41,13 @@ func _process(_delta: float) -> void: _hit_this_frame = false if _sustained_damage >= durability: - destroy() + collect() + + +## Destroy this node, with the player collecting the grunk value. +func collect() -> void: + Game.manager.collect_grunk(value) + destroy() ## Destroy this node. Called automatically when this node sustains damage beyond its durability.