override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { VoidEvent voidEvent = animator.GetComponent <VoidEvent>(); voidEvent.OnFired(); }