Esempio n. 1
0
        /// <summary>Called on Awake</summary>
        public virtual void AwakeState()
        {
            MainTagHash          = Animator.StringToHash(ID.name);              //Store the Main Tag at Awake
            LastStatePendingExit = false;

            foreach (var mod in TagModifiers)
            {
                mod.TagHash = Animator.StringToHash(mod.AnimationTag);          //Convert all the Tags to HashTags
            }

            SpeedSet = null;
            foreach (var set in animal.speedSets) //Find if this state has a Speed Set
            {
                if (set.states.Contains(ID))
                {
                    SpeedSet = set;
                    break;
                }
            }

            EnterExitEvent = animal.OnEnterExitStates.Find(st => st.ID == ID);

            InputValue        = false;
            IgnoreLowerStates = false;
            IsPersistent      = false;
            IsPending         = false;
            OnQueue           = false;
            IsActiveState     = false;
        }
Esempio n. 2
0
        /// <summary>Called on Awake</summary>
        public virtual void AwakeState()
        {
            MainTagHash = Animator.StringToHash(ID.name);                       //Store the Main Tag at Awake

            foreach (var mod in TagModifiers)
            {
                mod.TagHash = Animator.StringToHash(mod.AnimationTag);          //Convert all the Tags to HashTags
            }

            SpeedSet = null;
            foreach (var set in animal.speedSets) //Find if this state has a Speed Set
            {
                if (set.states.Contains(ID))
                {
                    SpeedSet = set;
                    break;
                }
            }

            EnterExitEvent = animal.OnEnterExitStates.Find(st => st.ID == ID);

            ExitState(); //Reset all the values to their default IMPORTANT
        }