// 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; }
void Start() { enscript = EnemySwordObj.GetComponent <EnemySword>(); MyAnim = this.GetComponent <Animator>(); }