Пример #1
0
 // 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)
 {
     _sword = animator.GetComponentInChildren <EnemySword>();
     _sword.EnableCollider(false);
     _timer    = 0;
     _attacked = false;
 }
Пример #2
0
 void Start()
 {
     enscript = EnemySwordObj.GetComponent <EnemySword>();
     MyAnim   = this.GetComponent <Animator>();
 }