generated from krampus/template-godot4
GunkNode has distinct destroy & collect methods
This commit is contained in:
parent
455b12971c
commit
517d903e9c
@ -41,6 +41,12 @@ func _process(_delta: float) -> void:
|
|||||||
_hit_this_frame = false
|
_hit_this_frame = false
|
||||||
|
|
||||||
if _sustained_damage >= durability:
|
if _sustained_damage >= durability:
|
||||||
|
collect()
|
||||||
|
|
||||||
|
|
||||||
|
## Destroy this node, with the player collecting the grunk value.
|
||||||
|
func collect() -> void:
|
||||||
|
Game.manager.collect_grunk(value)
|
||||||
destroy()
|
destroy()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user