public void setFloat(GAME_FLOAT param, float value, string comment = null) { if (!mFloatList.TryGetValue(param, out FloatParameter floatParam)) { floatParam = new FloatParameter(); floatParam.mValue = value; floatParam.mComment = comment; floatParam.mType = param; floatParam.mTypeString = param.ToString(); mFloatList.Add(param, floatParam); } else { floatParam.mValue = value; if (!isEmpty(comment)) { floatParam.mComment = comment; } mFloatList[param] = floatParam; } }
public void setFloat(GAME_FLOAT param, float value, string comment = null) { if (!mFloatList.ContainsKey(param)) { FloatParameter floatParam = new FloatParameter(); floatParam.mValue = value; floatParam.mComment = comment; floatParam.mType = param; floatParam.mTypeString = param.ToString(); mFloatList.Add(param, floatParam); } else { FloatParameter temp = mFloatList[param]; temp.mValue = value; if (!isEmpty(comment)) { temp.mComment = comment; } mFloatList[param] = temp; } }
//---------------------------------------------------------------------------------------------------------------------------------------------- protected void addFloat(GAME_FLOAT type) { mFloatNameToDefine.Add(type.ToString(), type); mFloatDefineToName.Add(type, type.ToString()); }