Example #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)
     {
         owner = animator.GetComponent <TDS_Enemy>();
     }
     if (!owner)
     {
         return;
     }
     if (animator.GetFloat("animationState") != 0)
     {
         owner.SetAnimationState(0);
     }
     attackingCoroutine = owner.StartCoroutine(owner.CastAttack());
 }