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); }
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); }
/// <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 { } }
/// <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); }
/// <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; } }
private ValueItem GetDouble() { return(ValueItem.New(keyField, doubleValue).SetDampTime(dampTime)); }
private ValueItem GetInt() { return(ValueItem.New(keyField, (int)floatValue).SetDampTime(dampTime)); }
public ValueItem GetString() { return(ValueItem.New(keyField, str).SetDampTime(dampTime)); }
public ValueItem GetBool() { return(ValueItem.New(keyField, triggerValue).SetDampTime(dampTime)); }
public ValueItem GetFloat() { return(ValueItem.New(keyField, floatValue).SetDampTime(dampTime)); }
public void SetValueItem(string keyField, string value) { ValueItem valueItem = ValueItem.New(keyField, value); mValueItemMapper[keyField] = valueItem; }