Beispiel #1
0
        private void MakeReservedPresetUnit(int uniqueID,
                                            string keyName,
                                            apControlParam.CATEGORY category,
                                            apControlParam.ICON_PRESET iconPreset,
                                            apControlParam.TYPE valueType,
                                            int int_Def, float float_Def, Vector2 vec2_Def,
                                            int int_Min, int int_Max,
                                            float float_Min, float float_Max,
                                            Vector2 vec2_Min, Vector2 vec2_Max,
                                            string label_Min, string label_Max,
                                            int snapSize)
        {
            apControlParamPresetUnit unit = GetPresetUnit(uniqueID);

            if (unit == null)
            {
                unit = new apControlParamPresetUnit();
                _units.Add(unit);
            }

            unit.SetReservedControlParam(uniqueID, keyName,
                                         category, iconPreset, valueType,
                                         int_Def, float_Def, vec2_Def,
                                         int_Min, int_Max,
                                         float_Min, float_Max,
                                         vec2_Min, vec2_Max,
                                         label_Min, label_Max,
                                         snapSize);
        }
Beispiel #2
0
        public void SetControlParam(apControlParam srcControlParam, int uniqueID)
        {
            _uniqueID = uniqueID;
            _keyName  = srcControlParam._keyName;


            _category   = srcControlParam._category;
            _iconPreset = srcControlParam._iconPreset;
            _valueType  = srcControlParam._valueType;

            //값은 Min-Max-Default로 나뉜다.
            _int_Def   = srcControlParam._int_Def;
            _float_Def = srcControlParam._float_Def;
            _vec2_Def  = srcControlParam._vec2_Def;

            _int_Min = srcControlParam._int_Min;
            _int_Max = srcControlParam._int_Max;

            _float_Min = srcControlParam._float_Min;
            _float_Max = srcControlParam._float_Max;

            _vec2_Min = srcControlParam._vec2_Min;
            _vec2_Max = srcControlParam._vec2_Max;

            _label_Min = srcControlParam._label_Min;
            _label_Max = srcControlParam._label_Max;


            _snapSize = srcControlParam._snapSize;

            _isReserved = false;            //<<Reserved는 아니다.
        }
        public static apImageSet.PRESET GetControlParamPresetIconType(apControlParam.ICON_PRESET iconType)
        {
            switch (iconType)
            {
            case apControlParam.ICON_PRESET.None:
                return(apImageSet.PRESET.Hierarchy_Param);

            case apControlParam.ICON_PRESET.Head:
                return(apImageSet.PRESET.ParamPreset_Head);

            case apControlParam.ICON_PRESET.Body:
                return(apImageSet.PRESET.ParamPreset_Body);

            case apControlParam.ICON_PRESET.Hand:
                return(apImageSet.PRESET.ParamPreset_Hand);

            case apControlParam.ICON_PRESET.Face:
                return(apImageSet.PRESET.ParamPreset_Face);

            case apControlParam.ICON_PRESET.Eye:
                return(apImageSet.PRESET.ParamPreset_Eye);

            case apControlParam.ICON_PRESET.Hair:
                return(apImageSet.PRESET.ParamPreset_Hair);

            case apControlParam.ICON_PRESET.Equipment:
                return(apImageSet.PRESET.ParamPreset_Equip);

            case apControlParam.ICON_PRESET.Cloth:
                return(apImageSet.PRESET.ParamPreset_Cloth);

            case apControlParam.ICON_PRESET.Force:
                return(apImageSet.PRESET.ParamPreset_Force);

            case apControlParam.ICON_PRESET.Etc:
                return(apImageSet.PRESET.ParamPreset_Etc);
            }
            return(apImageSet.PRESET.ParamPreset_Etc);
        }
Beispiel #4
0
        public void SetReservedControlParam(int uniqueID,
                                            string keyName,
                                            apControlParam.CATEGORY category,
                                            apControlParam.ICON_PRESET iconPreset,
                                            apControlParam.TYPE valueType,
                                            int int_Def, float float_Def, Vector2 vec2_Def,
                                            int int_Min, int int_Max,
                                            float float_Min, float float_Max,
                                            Vector2 vec2_Min, Vector2 vec2_Max,
                                            string label_Min, string label_Max,
                                            int snapSize)
        {
            _uniqueID   = uniqueID;
            _keyName    = keyName;
            _category   = category;
            _iconPreset = iconPreset;
            _valueType  = valueType;

            _int_Def   = int_Def;
            _float_Def = float_Def;
            _vec2_Def  = vec2_Def;

            _int_Min   = int_Min;
            _int_Max   = int_Max;
            _float_Min = float_Min;
            _float_Max = float_Max;
            _vec2_Min  = vec2_Min;
            _vec2_Max  = vec2_Max;

            _label_Min = label_Min;
            _label_Max = label_Max;

            _snapSize = snapSize;

            _isReserved = true;
        }
Beispiel #5
0
        public void Load(List <string> loadedStringSet)
        {
            string strKey = "", strValue = "";
            string strCur = "";

            for (int i = 0; i < loadedStringSet.Count; i++)
            {
                strCur = loadedStringSet[i];

                if (strCur.Length < 4)
                {
                    continue;
                }

                strKey = strCur.Substring(0, 4);

                if (strCur.Length > 4)
                {
                    strValue = strCur.Substring(4);
                }
                else
                {
                    strValue = "";
                }

                try
                {
                    if (strKey == "NAME")
                    {
                        _keyName = strValue;
                        if (string.IsNullOrEmpty(_keyName))
                        {
                            _keyName = "<NoName>";
                        }
                    }
                    else if (strKey == "CATG")
                    {
                        _category = (apControlParam.CATEGORY) int.Parse(strValue);
                    }
                    else if (strKey == "ICON")
                    {
                        _iconPreset = (apControlParam.ICON_PRESET) int.Parse(strValue);
                        //sw.WriteLine( + (int)_iconPreset);
                    }
                    else if (strKey == "VTYP")
                    {
                        _valueType = (apControlParam.TYPE) int.Parse(strValue);
                        //sw.WriteLine( + (int)_valueType);
                    }
                    else if (strKey == "ITDF")
                    {
                        _int_Def = int.Parse(strValue);
                        //sw.WriteLine("ITDF" + _int_Def);
                    }
                    else if (strKey == "FLDF")
                    {
                        _float_Def = float.Parse(strValue);
                        //sw.WriteLine("FLDF" + _float_Def);
                    }
                    else if (strKey == "VXDF")
                    {
                        _vec2_Def.x = float.Parse(strValue);
                        //sw.WriteLine("VXDF" + _vec2_Def.x);
                    }
                    else if (strKey == "VYDF")
                    {
                        _vec2_Def.y = float.Parse(strValue);
                        //sw.WriteLine("VYDF" + _vec2_Def.y);
                    }
                    else if (strKey == "ITMN")
                    {
                        _int_Min = int.Parse(strValue);
                        //sw.WriteLine("ITMN" + _int_Min);
                    }
                    else if (strKey == "ITMX")
                    {
                        _int_Max = int.Parse(strValue);
                        //sw.WriteLine("ITMX" + _int_Max);
                    }
                    else if (strKey == "FLMN")
                    {
                        _float_Min = float.Parse(strValue);
                        //sw.WriteLine("FLMN" + _float_Min);
                    }
                    else if (strKey == "FLMX")
                    {
                        _float_Max = float.Parse(strValue);
                        //sw.WriteLine("FLMX" + _float_Max);
                    }
                    else if (strKey == "VXMN")
                    {
                        _vec2_Min.x = float.Parse(strValue);
                        //sw.WriteLine("VXMN" + _vec2_Min.x);
                    }
                    else if (strKey == "VYMN")
                    {
                        _vec2_Min.y = float.Parse(strValue);
                        //sw.WriteLine("VYMN" + _vec2_Min.y);
                    }
                    else if (strKey == "VXMX")
                    {
                        _vec2_Max.x = float.Parse(strValue);
                        //sw.WriteLine("VXMX" + _vec2_Max.x);
                    }
                    else if (strKey == "VYMX")
                    {
                        _vec2_Max.y = float.Parse(strValue);
                        //sw.WriteLine("VYMX" + _vec2_Max.y);
                    }
                    else if (strKey == "LBMN")
                    {
                        _label_Min = strValue;
                        //sw.WriteLine("LBMN" + _label_Min);
                    }
                    else if (strKey == "LBMX")
                    {
                        _label_Max = strValue;
                        //sw.WriteLine("LBMX" + _label_Max);
                    }
                    else if (strKey == "SNAP")
                    {
                        _snapSize = int.Parse(strValue);
                        //sw.WriteLine("SNAP" + _snapSize);
                    }
                    else if (strKey == "UQID")
                    {
                        _uniqueID = int.Parse(strValue);
                    }
                    else if (strKey == "RSVD")
                    {
                        _isReserved = (int.Parse(strValue) == 1);
                    }
                }
                catch (Exception ex)
                {
                    Debug.LogError("Load Exception : " + ex);
                }
            }
        }