public void SetData(UserDataMode data) { userid = data.userid; // 角色ID username = data.username; // 角色名称 itemList = data.itemList; //道具列表 level = data.level; viplevel = data.viplevel; }
public static void AHIntTest() { AHInt test = 1; test += 2; int x = 3; test += x; Debug.Log("[AHIntTest] : " + test); }
public EquipData(int instanceid, int qualityid, int equipid, int roleid, List <EquipProperty> propertyList) { this.instanceid = instanceid; this.qualityID = qualityid; this.equipid = equipid; this.roleid = roleid; this.propertyList = propertyList; type = GoodsType.equip; }
// Use this for initialization void Start() { AHTestClass c = new AHTestClass(); AHInt test = 199; Debug.Log("ah test : " + (test - 9)); test -= 10; normalval = test; Debug.Log("noraml value : " + normalval); Debug.Log("JSON value : " + JsonMapper.ToJson(c)); }
public override bool Equals(object o) { if (o is AHInt) { AHInt b = (AHInt)o; return(this.v == b.v); } else { return(false); } }
public void Deserialize(DataStream stream) { short type = stream.ReadSInt16(); while (type != -1) { switch (type) { case 1: instanceid = stream.ReadSInt32(); break; case 2: roldid = stream.ReadSInt32(); break; case 3: name = stream.ReadString16(); break; case 4: int count = stream.ReadSInt32(); for (int i = 0; i < count; i++) { int id = stream.ReadSInt32(); choseEquipList.Add(id); } break; case 5: equipCount = stream.ReadSInt32(); break; case 6: int pcount = stream.ReadSInt32(); for (int i = 0; i < pcount; i++) { int id = stream.ReadSInt32(); additionPropertyList.Add(id, (float)stream.ReadSInt32() / 1000); } break; case 7: level = stream.ReadSInt32(); break; case 8: exp = stream.ReadSInt32(); break; case 9: levelupPoint = stream.ReadSInt32(); break; } type = stream.ReadSInt16(); } }
public void Deserialize(DataStream stream) { short type = stream.ReadSInt16(); while (type != -1) { switch (type) { case 1: id = stream.ReadSInt32(); break; case 2: val = (float)stream.ReadSInt32() / 1000f; break; } type = stream.ReadSInt16(); } //Debug.Log("EquipProperty : " + id + " val1,val2,val3 : " + val1 + "/" + val2 + "/" + val3); }
public override void Deserialize(DataStream stream) { //Debug.Log("================EquipData================="); short _type = stream.ReadSInt16(); while (_type != -1) { switch (_type) { case 1: instanceid = stream.ReadSInt32(); break; case 2: equipid = stream.ReadSInt32(); break; case 3: roleid = stream.ReadSInt32(); break; case 4: int listcount = stream.ReadSInt32(); propertyList = new List <EquipProperty>(); for (int i = 0; i < listcount; i++) { EquipProperty p = (new EquipProperty()); p.Deserialize(stream); propertyList.Add(p); } break; case 5: qualityID = stream.ReadSInt32(); break; } _type = stream.ReadSInt16(); } //Debug.Log("instanceid : " + instanceid + //" equipid : " + equipid + //" roleid : " + roleid + //" baseval : " + baseval); }
public bool Equals(AHInt b) { return((object)b != null && v == b.v); }