// 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 ) { if( mecController == null ) { mecController = animator.gameObject.GetComponent<SpineboyMecController>(); } mecController.attacked = false; }
void Start() { mecController = null; }