private void Awake() { agente = transform.GetComponent <UnityEngine.AI.NavMeshAgent>(); miAnim = GetComponent <Animator>(); refEnemigo = GetComponent <CopEnemy>(); Animaciones(); }
//// Start is called before the first frame update void Start() { refStateManager = GetComponent <StateMachine>(); refEnemigo = GetComponent <CopEnemy>(); agente = transform.GetComponent <UnityEngine.AI.NavMeshAgent>(); playerRef = FindObjectOfType <Mov>(); miAnim = GetComponent <Animator>(); agente.isStopped = true; Animaciones(); }