Add terrain hit effects, progressive damage component, and update collectable signals

This commit is contained in:
2025-05-29 01:00:19 +02:00
parent 37b96c0f11
commit 26af7a591d
29 changed files with 406 additions and 22 deletions

View File

@@ -0,0 +1,24 @@
class_name TerrainHitFx
extends Node
var gpu_particles: Array[GPUParticles2D] = []
func _ready() -> void:
if owner is GPUParticles2D:
gpu_particles.append(owner)
for child in get_children():
if child is GPUParticles2D:
gpu_particles.append(child)
func trigger_fx() -> Signal:
for fx in gpu_particles:
if fx:
fx.restart()
fx.emitting = true
return gpu_particles[0].finished