extends Node3D class_name Particle var life_time : float var is_pause : bool = false func _ready(): for child in get_children(): if child is GPUParticles3D: var particle = child as GPUParticles3D if particle.lifetime > life_time: life_time = particle.lifetime particle.restart() func _process(delta): if is_pause: return life_time -= delta if life_time <= 0: queue_free() func set_pause(is_pause_set:bool): is_pause = is_pause_set for child in get_children(): if child is GPUParticles3D: var particle = child as GPUParticles3D particle.speed_scale = 0 if is_pause else 1