Ejemplo n.º 1
0
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     patrol          = GameObject.FindGameObjectWithTag("PatrolSpots").GetComponent <PatrolSpots>();
     randomSpot      = Random.Range(0, patrol.patrolPoints.Length);
     waitTime        = startWaitTime;
     startPhaseTimer = PhaseTimer;
     SoundManagerScript.PlaySound("chaoschaos");
 }
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     patrol     = animator.GetComponent <PatrolSpots>();
     movePoints = new Transform[patrol.patrolPoints.Length];
     for (int i = 0; i < patrol.patrolPoints.Length; i++)
     {
         movePoints[i] = patrol.patrolPoints[i];
     }
     waitTime   = startWaitTime;
     randomSpot = Random.Range(0, movePoints.Length);
 }
Ejemplo n.º 3
0
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     patrols    = GameObject.FindGameObjectWithTag("PatrolSpots").GetComponent <PatrolSpots>();
     randomSpot = Random.Range(0, patrols.patrolPoints.Length);
 }