void Awake()
 {
     rpgCharacterController = GetComponent <RPGCharacterControllerFREE>();
     //Find the Animator component.
     animator = GetComponentInChildren <Animator>();
     StartCoroutine(_HideAllWeapons(false, false));
 }
Esempio n. 2
0
 public void Die()
 {
     rpgCharacterController = gameObject.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
     animator = gameObject.GetComponent <Animator>();
     gameObject.GetComponent <RPGCharacterAnims.RPGCharacterInputControllerFREE>().enabled = false;
     rpgCharacterController.movementAnimationSpeed = 0f;
     animator.SetTrigger("Death1Trigger");
 }
Esempio n. 3
0
 void Awake()
 {
     superCharacterController    = GetComponent <SuperCharacterController>();
     rpgCharacterController      = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterInputController = GetComponent <RPGCharacterInputController>();
     navMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>();
     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      = RPGCharacterState.Idle;
     rpgCharacterState = RPGCharacterState.Idle;
 }
Esempio n. 4
0
 void Awake()
 {
     rpgCharacterController         = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementControllerFREE>();
 }
Esempio n. 5
0
 // Start is called before the first frame update
 void Start()
 {
     InvokeRepeating("Attack", 1f, 2.5f);
     rpgCharacterController = GetComponent <RPGCharacterControllerFREE>();
 }
Esempio n. 6
0
 // Start is called before the first frame update
 void Start()
 {
     InvokeRepeating("Attack", 1f, Random.Range(0.25f, 5f));
     rpgCharacterController         = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementControllerFREE>();
 }
Esempio n. 7
0
 void Awake()
 {
     rpgCharacterController = player.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
     playerManager          = GameObject.Find("GameManager").GetComponent <PlayerManager>();
     myStats = player.GetComponent <CharacterStats>();
 }
Esempio n. 8
0
 void Start()
 {
     rpgCharacterController = player.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
 }