private void Start()
 {
     superCharacterController = GetComponent <SuperCharacterController>();
     warriorController        = GetComponent <WarriorControllerFREE>();
     warriorInputController   = GetComponent <WarriorInputControllerFREE>();
     animator = GetComponentInChildren <Animator>();
     rb       = GetComponent <Rigidbody>();
     if (rb != null)
     {
         //Set restraints on startup if using Rigidbody.
         rb.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
     }
     //Set currentState to idle on startup.
     currentState = WarriorState.Idle;
     warriorState = WarriorState.Idle;
     SwitchCollisionOn();
 }
Beispiel #2
0
 private void Awake()
 {
     warriorController         = GetComponent <WarriorControllerFREE>();
     warriorMovementController = GetComponent <WarriorMovementControllerFREE>();
 }