extends Control

@onready var sub_item_list = [$LockItem,$WeaponItem]

func _ready():
	SignalManager.character_status_changed.connect(on_character_status_changed)

func on_character_status_changed(id:int,status_name:String,value):
	if id != Global.character_mgr.get_player_id():
		return
	var func_name = "on_%s_changed" % status_name
	for sub_item in sub_item_list:
		if sub_item.has_method(func_name):
			sub_item.call(func_name,value)
