示例#1
0
        //--------------------------------------------------------------------------------------------------------------



        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();
        }
示例#2
0
 /// <summary>
 /// Initializes the state controller.
 /// </summary>
 public virtual void Initialize(GameObject reference)
 {
     characterMotor     = reference.GetComponent <CharacterMotor>();
     characterAnimation = reference.GetComponent <CharacterAnimation>();
 }