Exemplo n.º 1
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     hope      = animator.gameObject;
     hopeAI    = hope.GetComponent <HopeAI>();
     thePlayer = hopeAI.GetPlayer();
     agent     = hope.GetComponent <NavMeshAgent>();
 }
Exemplo n.º 2
0
 private void Awake()
 {
     _instance  = this;
     _thePlayer = GameObject.FindGameObjectWithTag("Player");
     _animator  = GetComponent <Animator>();
     waypoints  = GameObject.FindGameObjectsWithTag("Waypoint");
     _aText     = GetComponentInChildren <Text>();
     //_ca
 }