extends Node3D
class_name EffectBase

@export var life_time : float = 1
var life_time_now : float
var is_pause : bool = false
var rate : float

func _ready():
	life_time_now = life_time
	on_ready()

func _process(delta):
	if is_pause:
		return
	life_time_now -= delta
	if life_time_now <= 0:
		queue_free()
		return
	rate = life_time_now / life_time
	on_process(delta)

func set_pause(is_pause_set:bool):
	is_pause = is_pause_set
	on_set_pause(is_pause_set)

func on_ready():pass
func on_process(delta:float):pass
func on_set_pause(is_pause_set:bool):pass
