Esempio n. 1
0
        public ValueItem GetValue()
        {
            ValueItem result;

            switch (valueType)
            {
            case ValueItem.STRING:
                result = GetString();
                break;

            case ValueItem.INT:
                result = GetInt();
                break;

            case ValueItem.DOUBLE:
                result = GetDouble();
                break;

            case ValueItem.BOOL:
                result = GetBool();
                break;

            case ValueItem.FLOAT:
                result = GetFloat();
                break;

            default:
                result = ValueItem.New(keyField, string.Empty);
                break;
            }
            return(result);
        }
Esempio n. 2
0
        public ComboMotionCreater(int comboMax, ValueItem[] motionTriggerParam, ValueItem[] motionTransParam, Action onMotionCompletion = default)
        {
            ComboMotionMax = comboMax;

            MotionTransParam   = motionTransParam;
            MotionTriggerParam = motionTriggerParam;

            AniUpdater          = new AnimationInfoUpdater();
            mValueItemForRevert = ValueItem.New(string.Empty);
        }
Esempio n. 3
0
 /// <summary>
 /// 设置编辑器字段值
 /// </summary>
 /// <param name="keyField"></param>
 /// <param name="value"></param>
 public void SetValueItem(string keyField, string value)
 {
     if (mValueItemMapper != default)
     {
         ValueItem valueItem = ValueItem.New(keyField, value);
         mValueItemMapper[keyField] = valueItem;
     }
     else
     {
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 根据类型获取代表基础类型数据的值对象
        /// </summary>
        /// <param name="isRefresh"></param>
        /// <returns></returns>
        public ValueItem Result(bool isRefresh = false)
        {
            if (isRefresh)
            {
                Clean();
            }
            else
            {
            }

            if (mCached == default)
            {
                ValueItem result;
                int       type = (int)valueType;
                switch (type)
                {
                case ValueItem.STRING:
                    result = GetString();
                    break;

                case ValueItem.INT:
                    result = GetInt();
                    break;

                case ValueItem.DOUBLE:
                    result = GetDouble();
                    break;

                case ValueItem.BOOL:
                    result = GetBool();
                    break;

                case ValueItem.FLOAT:
                    result = GetFloat();
                    break;

                default:
                    result = ValueItem.New(keyField, string.Empty);
                    break;
                }
                mCached = result;
            }
            else
            {
            }

            return(mCached);
        }
Esempio n. 5
0
        /// <summary>
        /// 设置浮点型动画参数
        /// </summary>
        /// <param name="paramName"></param>
        /// <param name="value"></param>
        public void SetFloat(string paramName, float value)
        {
            bool isExist = mFieldMapper.IsContainsKey(paramName);

            ValueItem item = isExist ? mFieldMapper[paramName] : ValueItem.New(paramName, value);

            if (isExist)
            {
                item.Float = value;
            }
            else
            {
                mFieldMapper[paramName] = item;
                item.KeyField           = paramName;
            }
        }
Esempio n. 6
0
 private ValueItem GetDouble()
 {
     return(ValueItem.New(keyField, doubleValue).SetDampTime(dampTime));
 }
Esempio n. 7
0
 private ValueItem GetInt()
 {
     return(ValueItem.New(keyField, (int)floatValue).SetDampTime(dampTime));
 }
Esempio n. 8
0
 public ValueItem GetString()
 {
     return(ValueItem.New(keyField, str).SetDampTime(dampTime));
 }
Esempio n. 9
0
 public ValueItem GetBool()
 {
     return(ValueItem.New(keyField, triggerValue).SetDampTime(dampTime));
 }
Esempio n. 10
0
 public ValueItem GetFloat()
 {
     return(ValueItem.New(keyField, floatValue).SetDampTime(dampTime));
 }
Esempio n. 11
0
        public void SetValueItem(string keyField, string value)
        {
            ValueItem valueItem = ValueItem.New(keyField, value);

            mValueItemMapper[keyField] = valueItem;
        }