예제 #1
0
 public Prop(PropName _name)
 {
     idCount++;
     name   = _name;
     propID = idCount;
     type   = aSongUI_Controller.Instance.GetPropType(_name);
     pic    = Resources.Load <Sprite>(type.ToString() + "/" + _name.ToString());
     weight = aSongUI_Controller.Instance.GetWeight(_name);
     num    = aSongUI_Controller.Instance.GetNum(_name);
     maxNum = aSongUI_Controller.Instance.GetMaxNum(_name);
 }
            public PropertyData?GetPropertyData()
            {
                byte[] valueData;

                if (Utils.ProtoBuf.TrySerialize(Value, out valueData) == null)
                {
                    return(new PropertyData(PropName.ToString(), valueData, Enabled, ValueType));
                }
                else
                {
                    return(default(PropertyData));
                }
            }
예제 #3
0
 public float GetWeight(PropName _name)
 {
     return(float.Parse(jd[_name.ToString()]["weight"].ToString()));
 }
예제 #4
0
 public int GetMaxNum(PropName _name)
 {
     return(int.Parse(jd[_name.ToString()]["maxNum"].ToString()));
 }
예제 #5
0
 public PropType GetPropType(PropName _name)
 {
     return((PropType)Enum.Parse(typeof(PropType), jd[_name.ToString()]["propType"].ToString()));
 }