public static void Deserialize(VerticalDefine ins, tabtoy.DataReader reader) { // 服务器IP if (reader.MatchTag(0x60000)) { ins.ServerIP = reader.ReadString(); } // 调试模式 if (reader.MatchTag(0x70001)) { ins.DebugMode = reader.ReadBool(); } // 客户端人数限制 if (reader.MatchTag(0x10002)) { ins.ClientLimit = reader.ReadInt32(); } // 端 if (reader.MatchTag(0x90003)) { ins.Peer = reader.ReadStruct <PeerData>(PeerDataDeserializeHandler); } if (reader.MatchTag(0x50004)) { ins.Float = reader.ReadFloat(); } }
public static void Deserialize(ExpDefine ins, tabtoy.DataReader reader) { // 唯一ID if (reader.MatchTag(0x10000)) { ins.Level = reader.ReadInt32(); } // 经验值 if (reader.MatchTag(0x10001)) { ins.Exp = reader.ReadInt32(); } // 布尔检查 if (reader.MatchTag(0x70002)) { ins.BoolChecker = reader.ReadBool(); } // 类型 if (reader.MatchTag(0x80003)) { ins.Type = reader.ReadEnum <ActorType>(); } }
public PeerData Peer = new PeerData(); // 端 public void Deserialize(tabtoy.DataReader reader) { // 服务器IP if (reader.MatchTag(0x60000)) { this.ServerIP = reader.ReadString( ); } // 调试模式 if (reader.MatchTag(0x70001)) { this.DebugMode = reader.ReadBool( ); } // 客户端人数限制 if (reader.MatchTag(0x10002)) { this.ClientLimit = reader.ReadInt32( ); } // 端 if (reader.MatchTag(0x90003)) { this.Peer = reader.ReadStruct <PeerData>( ); } }
public void Deserialize(tabtoy.DataReader reader) { // Sample if (reader.MatchTag(0x90000)) { reader.ReadList_Struct <SampleDefine>(this.Sample); } // Exp if (reader.MatchTag(0x90001)) { reader.ReadList_Struct <ExpDefine>(this.Exp); } // Build Sample Index for (int i = 0; i < this.Sample.Count; i++) { var element = this.Sample[i]; _SampleByID.Add(element.ID, element); _SampleByName.Add(element.Name, element); } // Build Exp Index for (int i = 0; i < this.Exp.Count; i++) { var element = this.Exp[i]; _ExpByLevel.Add(element.Level, element); } }
public static void Deserialize(PeerData ins, tabtoy.DataReader reader) { if (reader.MatchTag(0x60000)) { ins.Name = reader.ReadString(); } if (reader.MatchTag(0x60001)) { ins.Type = reader.ReadString(); } }
public static void Deserialize(Vec2 ins, tabtoy.DataReader reader) { if (reader.MatchTag(0x10000)) { ins.X = reader.ReadInt32(); } if (reader.MatchTag(0x10001)) { ins.Y = reader.ReadInt32(); } }
public void Deserialize(tabtoy.DataReader reader) { if (reader.MatchTag(0x60000)) { this.Name = reader.ReadString( ); } if (reader.MatchTag(0x60001)) { this.Type = reader.ReadString( ); } }
public void Deserialize(tabtoy.DataReader reader) { // 唯一ID if (reader.MatchTag(0x20000)) { this.ID = reader.ReadInt64( ); } // 名称 if (reader.MatchTag(0x60001)) { this.Name = reader.ReadString( ); } // if (reader.MatchTag(0x10002)) { this.IconID = reader.ReadInt32( ); } // 攻击率 if (reader.MatchTag(0x50003)) { this.NumericalRate = reader.ReadFloat( ); } // 物品id if (reader.MatchTag(0x10004)) { this.ItemID = reader.ReadInt32( ); } // BuffID if (reader.MatchTag(0x10005)) { reader.ReadList_Int32(this.BuffID); } // 类型 if (reader.MatchTag(0x80006)) { this.Type = reader.ReadEnum <ActorType>( ); } // 技能ID列表 if (reader.MatchTag(0x10007)) { reader.ReadList_Int32(this.SkillID); } // 字符串结构 if (reader.MatchTag(0x90008)) { reader.ReadList_Struct <Prop>(this.StrStruct); } }
public static void Deserialize(Prop ins, tabtoy.DataReader reader) { if (reader.MatchTag(0x10000)) { ins.HP = reader.ReadInt32(); } if (reader.MatchTag(0x50001)) { ins.AttackRate = reader.ReadFloat(); } if (reader.MatchTag(0x80002)) { ins.ExType = reader.ReadEnum <ActorType>(); } }
public ActorType Type = ActorType.Fighter; // 类型 public void Deserialize(tabtoy.DataReader reader) { // 唯一ID if (reader.MatchTag(0x10000)) { this.Level = reader.ReadInt32( ); } // 经验值 if (reader.MatchTag(0x10001)) { this.Exp = reader.ReadInt32( ); } // 类型 if (reader.MatchTag(0x80002)) { this.Type = reader.ReadEnum <ActorType>( ); } }
public void Deserialize(tabtoy.DataReader reader) { // 血量 if (reader.MatchTag(0x10000)) { this.HP = reader.ReadInt32( ); } // 攻击速率 if (reader.MatchTag(0x50001)) { this.AttackRate = reader.ReadFloat( ); } // 扩展类型 if (reader.MatchTag(0x80002)) { this.ExType = reader.ReadEnum <ActorType>( ); } }
public static void Deserialize(Config ins, tabtoy.DataReader reader) { // Sample if (reader.MatchTag(0xa0000)) { reader.ReadList_Struct <SampleDefine>(ins.Sample, SampleDefineDeserializeHandler); } // Vertical if (reader.MatchTag(0xa0001)) { reader.ReadList_Struct <VerticalDefine>(ins.Vertical, VerticalDefineDeserializeHandler); } // Exp if (reader.MatchTag(0xa0002)) { reader.ReadList_Struct <ExpDefine>(ins.Exp, ExpDefineDeserializeHandler); } // Build Sample Index for (int i = 0; i < ins.Sample.Count; i++) { var element = ins.Sample[i]; ins._SampleByID.Add(element.ID, element); ins._SampleByName.Add(element.Name, element); } // Build Exp Index for (int i = 0; i < ins.Exp.Count; i++) { var element = ins.Exp[i]; ins._ExpByLevel.Add(element.Level, element); } }
public static void Deserialize(SampleDefine ins, tabtoy.DataReader reader) { // 唯一ID if (reader.MatchTag(0x20000)) { ins.ID = reader.ReadInt64(); } // 名称 if (reader.MatchTag(0x60001)) { ins.Name = reader.ReadString(); } // 图标ID if (reader.MatchTag(0x10002)) { ins.IconID = reader.ReadInt32(); } // 攻击率 if (reader.MatchTag(0x50003)) { ins.NumericalRate = reader.ReadFloat(); } // 物品id if (reader.MatchTag(0x10004)) { ins.ItemID = reader.ReadInt32(); } // BuffID if (reader.MatchTag(0x10005)) { reader.ReadList_Int32(ins.BuffID); } if (reader.MatchTag(0x90006)) { ins.Pos = reader.ReadStruct <Vec2>(Vec2DeserializeHandler); } // 类型 if (reader.MatchTag(0x80007)) { ins.Type = reader.ReadEnum <ActorType>(); } // 技能ID列表 if (reader.MatchTag(0x10008)) { reader.ReadList_Int32(ins.SkillID); } // 单结构解析 if (reader.MatchTag(0x90009)) { ins.SingleStruct = reader.ReadStruct <Prop>(PropDeserializeHandler); } // 字符串结构 if (reader.MatchTag(0x9000a)) { reader.ReadList_Struct <Prop>(ins.StrStruct, PropDeserializeHandler); } }