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)); } }
public float GetWeight(PropName _name) { return(float.Parse(jd[_name.ToString()]["weight"].ToString())); }
public int GetMaxNum(PropName _name) { return(int.Parse(jd[_name.ToString()]["maxNum"].ToString())); }
public PropType GetPropType(PropName _name) { return((PropType)Enum.Parse(typeof(PropType), jd[_name.ToString()]["propType"].ToString())); }