private void Awake()
 {
     rpgCharacterController = GetComponent <RPGCharacterController>();
     //Find the Animator component.
     animator = GetComponentInChildren <Animator>();
     StartCoroutine(_HideAllWeapons(false, false));
 }
 private void Awake()
 {
     superCharacterController    = GetComponent <SuperCharacterController.Code.SuperCharacterController.Core.SuperCharacterController>();
     rpgCharacterController      = GetComponent <RPGCharacterController>();
     rpgCharacterInputController = GetComponent <RPGCharacterInputController>();
     navMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>();
     animator     = GetComponentInChildren <Animator>();
     capCollider  = GetComponent <CapsuleCollider>();
     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      = RPGCharacterState.Idle;
     rpgCharacterState = RPGCharacterState.Idle;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     rpgCharacterController         = GetComponent <RPGCharacterController>();
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementController>();
     rpgCharacterWeaponController   = GetComponent <RPGCharacterWeaponController>();
 }