Beispiel #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)
 {
     if (!PhotonNetwork.isMasterClient)
     {
         return;
     }
     if (owner == null)
     {
         owner = animator.GetComponent <TDS_Enemy>();
     }
     owner.SetEnemyState(EnemyState.None);
 }
Beispiel #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 (!owner)
     {
         owner = animator.GetComponent <TDS_Enemy>();
     }
     if (!owner)
     {
         return;
     }
     owner.SetEnemyState(0);
 }