void Awake() { _instance = this; rigid = GetComponent <Rigidbody>(); collide = GetComponentInChildren <CapsuleCollider>(); character_equip = GetComponent <PlayerCharacterEquip>(); equip_attachments = GetComponentsInChildren <EquipAttach>(); facing = transform.forward; prev_pos = transform.position; }
void Awake() { character = GetComponent <PlayerCharacter>(); character_equip = GetComponent <PlayerCharacterEquip>(); animator = GetComponentInChildren <Animator>(); character.onTakeItem += OnTake; character.onGainItem += OnGain; character.onBuild += OnBuild; character.onAttack += OnAttack; character.onAttackHit += OnAttackHit; character.onDamaged += OnDamaged; character.onDeath += OnDeath; character.onTriggerAnim += OnTriggerAnim; }