// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     m_CharacterSword = animator.gameObject.GetComponentInChildren<CharacterSword> ();
     if (m_CharacterSword != null) {
         m_CharacterSword.m_IsAttacking = true;
     }
 }
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)
 {
     m_CharacterSword = animator.gameObject.GetComponentInChildren <CharacterSword> ();
     if (m_CharacterSword != null)
     {
         m_CharacterSword.m_IsAttacking = true;
     }
 }