Ejemplo n.º 1
0
        protected AnimatorTransitionBase(AssetInfo assetInfo, ClassIDType classID, BaseParameters parameters) :
            base(assetInfo, HideFlags.HideInHierarchy)
        {
            List <AnimatorCondition> conditionList = new List <AnimatorCondition>(parameters.ConditionConstants.Count);

            for (int i = 0; i < parameters.ConditionConstants.Count; i++)
            {
                ConditionConstant conditionConstant = parameters.ConditionConstants[i].Instance;
                if (conditionConstant.ConditionMode != AnimatorConditionMode.ExitTime)
                {
                    AnimatorCondition condition = new AnimatorCondition(conditionConstant, parameters.TOS);
                    conditionList.Add(condition);
                }
            }
            m_conditions = conditionList.ToArray();

            AnimatorState state = parameters.GetDestinationState();

            DstStateMachine = default;

            DstState = state == null ? default : state.File.CreatePPtr(state);

                       Name   = parameters.Name;
                       Solo   = false;
                       Mute   = false;
                       IsExit = parameters.IsExit;
        }
Ejemplo n.º 2
0
        private AnimatorTransitionBase(AssetInfo assetInfo, ClassIDType classID, AnimatorController controller, IReadOnlyList <OffsetPtr <ConditionConstant> > conditions) :
            base(assetInfo, 1)
        {
            List <AnimatorCondition> conditionList = new List <AnimatorCondition>(conditions.Count);

            for (int i = 0; i < conditions.Count; i++)
            {
                ConditionConstant conditionConstant = conditions[i].Instance;
                if (conditionConstant.ConditionMode != AnimatorConditionMode.ExitTime)
                {
                    AnimatorCondition condition = new AnimatorCondition(controller, conditionConstant);
                    conditionList.Add(condition);
                }
            }
            m_conditions = conditionList.ToArray();

            DstStateMachine = default;
            DstState        = default;

            Solo = false;
            Mute = false;
        }