예제 #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)
 {
     lift   = animator.GetComponentInChildren <ParticleSystem>();
     runner = animator.GetComponent <ZombieRunner>();
     runner.PlayZombieChase();
     runner.SwitchState(ZombieRunner.EnemyState.ATTACK);
     switchNextStateTimer = Time.time + constantTime;
     lift.Play();
 }
예제 #2
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)
 {
     if (audioSource == null)
     {
         audioSource = animator.GetComponent <AudioSource>();
     }
     audioSource.Play();
     runner = animator.GetComponent <ZombieRunner>();
     switchNextStateTimer = Time.time + Random.Range(minRandomTime, maxRandomTime);
 }
 // 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)
 {
     runner = animator.GetComponent <ZombieRunner>();
 }
 // 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)
 {
     runner = animator.GetComponent <ZombieRunner>();
     switchNextStateTimer = Time.time + Random.Range(minRandomTime, maxRandomTime);
 }