/// <summary> /// Unity's awake initializer /// Overriders must call base.Awake() when overriding. /// </summary> protected virtual void Awake() { this.attackState = AttackState.None(); this.anim = GetComponentInChildren <Animator>(); // we could just reference charactercontrol here. the function might be not necessary // but it seems strange to have the char control->hero->char control cyclic references this.uiOverrideFunction = GetComponent <CharacterControl>().GetAttackUIOverrideFunction(); this.cooldowns = GetComponent <Cooldowns>(); }