class_name CharacterComponent extends Node var character: Character func _enter_tree(): assert(owner, "owner not set") assert(owner is Character, "owner must be a character") character = owner