// 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) { EnemySnowman snowmanRefrence = animator.transform.parent.GetComponent <EnemySnowman>(); if (snowmanRefrence.GetPhase() != EnemySnowman.Phase.three) { snowmanRefrence.SetPhase(); snowmanRefrence.CheckPhase(); } animator.GetComponent <Snowman_Animations>().PlayerCanContinue(false); }
private void Awake() { mainScript = transform.parent.GetComponent <EnemySnowman>(); }