void Awake()
 {
     rpgCharacterController = GetComponent <RPGCharacterControllerFREE>();
     //Find the Animator component.
     animator = GetComponentInChildren <Animator>();
     StartCoroutine(_HideAllWeapons(false, false));
 }
Ejemplo 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");
 }
Ejemplo 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;
 }
Ejemplo n.º 4
0
 void Awake()
 {
     rpgCharacterController         = GetComponent <RPGCharacterControllerFREE>();
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementControllerFREE>();
 }
Ejemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     InvokeRepeating("Attack", 1f, 2.5f);
     rpgCharacterController = GetComponent <RPGCharacterControllerFREE>();
 }
Ejemplo 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>();
 }
Ejemplo n.º 7
0
 void Awake()
 {
     rpgCharacterController = player.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
     playerManager          = GameObject.Find("GameManager").GetComponent <PlayerManager>();
     myStats = player.GetComponent <CharacterStats>();
 }
Ejemplo n.º 8
0
 void Start()
 {
     rpgCharacterController = player.GetComponent <RPGCharacterAnims.RPGCharacterControllerFREE>();
 }