Esempio n. 1
0
        /// <summary>
        /// Sets a new state for this ability
        /// </summary>
        /// <param name="newState">Name of the new state</param>
        /// <param name="transitionDuration">Duration of transition</param>
        protected virtual void SetState(string newState, float transitionDuration)
        {
            if (m_CurrentStatePlaying == newState)
            {
                return;
            }

            m_AnimatorManager.SetAnimatorState(newState, transitionDuration, AnimatorManager.BaseLayerIndex);
            m_CurrentStatePlaying = newState; // Set new current state
        }