SchildDerStaerke/scripts/explosion.gd

17 lines
323 B
GDScript

extends Node3D
class_name Explosion
@onready var particles := get_children().filter(func(n): return n is GPUParticles3D or n is CPUParticles3D)
func start() -> void:
_set_emission(true)
func stop() -> void:
_set_emission(false)
func _set_emission(enabled: bool) -> void:
for p in particles:
p.emitting = enabled