예제 #1
0
        protected virtual void OnEnable()
        {
            wizard = GetComponent <Wizard>();
            Assert.IsNotNull(wizard, "Wizard not found");

            stateMachine = wizard.stateMachine;
            Assert.IsNotNull(stateMachine, "Wizard State Machine not found");
        }
예제 #2
0
        private WizardStateMachine GetStateMachine(Animator animator)
        {
            if (wizardStateMachine != null)
            {
                return(wizardStateMachine);
            }

            wizardStateMachine = animator.gameObject.GetComponent <WizardStateMachine>();
            Assert.IsNotNull(wizardStateMachine, "Wizard State Machine not found");

            return(wizardStateMachine);
        }