@abstract
class_name ComponentBase extends Node

@export_category("Component Base Setting")
@export var component_owner : Node

##改变量用来控制组件是否启用
@export var is_active : bool = true:
	set(value):
		set_physics_process(value)
		set_process(value)
		is_active = value


func _ready() -> void:
	if not component_owner:
		component_owner = owner
	
	#组件在初始化时都会等待character的加载
	if component_owner and not component_owner.is_node_ready() : await component_owner.ready
	_init_component()

@abstract
func _init_component() -> void
