示例#1
0
            public Data()
            {
                userDefined = true;
                changed     = false;
                isStepFlag  = false;

                propertyFlag       = "";
                optionText         = "";
                currentValue       = "";
                propertyType       = Type.GROUP;
                associatedEnumType = "";
                processStep        = (aiPostProcessSteps)0;
                propertyCategory   = Category.None;;
                customOption       = SelfDefinedOption.NONE;
            }
示例#2
0
            private static System.Object InitValue(SelfDefinedOption option, Property.Type type, System.Object default_value)
            {
                string key_name = Enum.GetName(typeof(SelfDefinedOption), option);

                if (PlayerPrefs.HasKey(key_name))
                {
                    return(PlayerPrefs.GetString(key_name));
                }
                else
                {
                    if (type == Property.Type.FLAG)
                    {
                        return((int)default_value);                         // Must be cast explicitely to int to avoid ToString conversion of enums
                    }
                    else
                    {
                        return(default_value);
                    }
                }
            }
示例#3
0
 internal Data(SelfDefinedOption option, Property.Type type, Category category, System.Type enum_type, System.Object init_value) :
     this(Enum.GetName(typeof(SelfDefinedOption), option), type, category, InitValue(option, type, (int)init_value), true)
 {
     customOption       = option;
     associatedEnumType = enum_type.ToString();
 }
示例#4
0
 internal Data(SelfDefinedOption option, Property.Type type, Category category, System.Object init_value) :
     this(option, type, category, init_value, true)
 {
 }
示例#5
0
 internal Data(SelfDefinedOption option, Property.Type type, Category category, System.Object init_value, bool user_defined) :
     this(Enum.GetName(typeof(SelfDefinedOption), option), type, category, InitValue(option, type, init_value), user_defined)
 {
     customOption = option;
 }