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)
 {
     animatorRoot = animator.transform.parent;
     enemy        = animator.GetComponent <EnemyAir>();
     player       = GameManager.Instance.player;
     trackSpeed   = enemy.trackSpeed;
     direction    = Vector2.up;
     SetDirection();
 }
Exemplo n.º 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)
 {
     enemy       = animator.GetComponent <EnemyAir>();
     noticeRange = enemy.noticeRange;
 }