//-------------------------------------------------------------------------------------------------------------- protected override void Awake() { base.Awake(); characterBrain = GetComponent <CharacterBrain>(); if (characterBrain == null) { Debug.Log("\"CharacterBrain\" component is missing."); } if (characterAnimation == null) { characterAnimation = GetComponentInChildren <CharacterAnimation>(); } movementController.Initialize(gameObject); poseController.Initialize(gameObject); InitializeAbilities(); }
/// <summary> /// Initializes the state controller. /// </summary> public virtual void Initialize(GameObject reference) { characterMotor = reference.GetComponent <CharacterMotor>(); characterAnimation = reference.GetComponent <CharacterAnimation>(); }