Hark-the-Moon-Men-Cometh / Assets / Vendor / Kevin Iglesias / Caster Mage Animations / Scripts / ThrowNova.cs
ThrowNova.cs
Raw
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace KevinIglesias {

    public class ThrowNova : StateMachineBehaviour {

        CastSpells cS;
    
        public float spawnDelay;
        
        override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
            
            if(cS == null)
            {
                cS = animator.GetComponent<CastSpells>();
            }
            
            if(cS != null)
            {
               cS.ThrowNova(spawnDelay);
            }
        }
    }
}