本文整理汇总了C#中NReader类的典型用法代码示例。如果您正苦于以下问题:C# NReader类的具体用法?C# NReader怎么用?C# NReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NReader类属于命名空间,在下文中一共展示了NReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Read
protected override void Read(ClientProcessor psr, NReader rdr)
{
Time = rdr.ReadInt32();
BulletId = rdr.ReadByte();
ObjectId = rdr.ReadInt32();
TargetId = rdr.ReadInt32();
}
开发者ID:lcnvdl,项目名称:rotmg-server,代码行数:7,代码来源:OtherHitPacket.cs
示例2: Read
protected override void Read(NReader rdr)
{
AccountListId = rdr.ReadInt32();
AccountIds = new int[rdr.ReadInt16()];
for (var i = 0; i < AccountIds.Length; i++)
AccountIds[i] = rdr.ReadInt32();
}
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:7,代码来源:AccountListPacket.cs
示例3: Read
protected override void Read(NReader rdr)
{
Damage = rdr.ReadInt32();
EnemyId = rdr.ReadInt32();
BulletId = rdr.ReadByte();
ArmorPiercing = rdr.ReadBoolean();
}
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:7,代码来源:VisibulletPacket.cs
示例4: Read
protected override void Read(NReader rdr)
{
Time = rdr.ReadInt32();
Position = Position.Read(rdr);
Obj1 = ObjectSlot.Read(rdr);
Obj2 = ObjectSlot.Read(rdr);
}
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:7,代码来源:InvSwapPacket.cs
示例5: Read
protected override void Read(Client client, NReader rdr)
{
Tier = rdr.ReadInt32();
Goal = rdr.ReadUTF();
Description = rdr.ReadUTF();
Image = rdr.ReadUTF();
}
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:7,代码来源:QuestFetchResponsePacket.cs
示例6: Read
protected override void Read(ClientProcessor psr, NReader rdr)
{
Time = rdr.ReadInt32();
Position = Position.Read(rdr);
Obj1 = ObjectSlot.Read(rdr);
Obj2 = ObjectSlot.Read(rdr);
}
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:7,代码来源:InvSwapPacket.cs
示例7: Read
protected override void Read(ClientProcessor psr, NReader rdr)
{
AccountListId = rdr.ReadInt32();
AccountIds = new int[rdr.ReadInt16()];
for (int i = 0; i < AccountIds.Length; i++)
AccountIds[i] = rdr.ReadInt32();
}
开发者ID:rotmgkillroyx,项目名称:rotmg_svr_OLD,代码行数:7,代码来源:AccountListPacket.cs
示例8: Read
protected override void Read(NReader rdr)
{
Time = rdr.ReadInt32();
BulletId = rdr.ReadByte();
ObjectId = rdr.ReadInt32();
TargetId = rdr.ReadInt32();
}
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:7,代码来源:OtherHitPacket.cs
示例9: Read
protected override void Read(Client psr, NReader rdr)
{
Time = rdr.ReadInt32();
BulletId = rdr.ReadByte();
TargetId = rdr.ReadInt32();
Killed = rdr.ReadBoolean();
}
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:7,代码来源:EnemyHitPacket.cs
示例10: Read
protected override void Read(NReader rdr)
{
BulletId = rdr.ReadByte();
OwnerId = rdr.ReadInt32();
ContainerType = rdr.ReadUInt16();
Angle = rdr.ReadSingle();
}
开发者ID:Jankos132,项目名称:Server-Source,代码行数:7,代码来源:AllyShootPacket.cs
示例11: Convert
public static byte[] Convert(string json)
{
var obj = JsonConvert.DeserializeObject<json_dat>(json);
var dat = ZlibStream.UncompressBuffer(obj.data);
Dictionary<short, TerrainTile> tileDict = new Dictionary<short, TerrainTile>();
for (int i = 0; i < obj.dict.Length; i++)
{
var o = obj.dict[i];
tileDict[(short)i] = new TerrainTile()
{
TileId = o.ground == null ? (short)0xff : XmlDatas.IdToType[o.ground],
TileObj = o.objs == null ? null : o.objs[0].id,
Name = o.objs == null ? "" : o.objs[0].name ?? "",
Terrain = TerrainType.None,
Region = o.regions == null ? TileRegion.None : (TileRegion)Enum.Parse(typeof(TileRegion), o.regions[0].id.Replace(' ', '_'))
};
}
var tiles = new TerrainTile[obj.width, obj.height];
using (NReader rdr = new NReader(new MemoryStream(dat)))
for (int y = 0; y < obj.height; y++)
for (int x = 0; x < obj.width; x++)
{
tiles[x, y] = tileDict[rdr.ReadInt16()];
}
return Export(tiles);
}
开发者ID:Topnenyie,项目名称:rotmg_svr-master,代码行数:28,代码来源:jsonwmapexporter.cs
示例12: Read
protected override void Read(Client psr, NReader rdr)
{
Time = rdr.ReadInt32();
SlotObject = ObjectSlot.Read(psr, rdr);
ItemUsePos = Position.Read(psr, rdr);
UseType = rdr.ReadByte();
}
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:7,代码来源:UseItemPacket.cs
示例13: Read
protected override void Read(Client psr, NReader rdr)
{
Time = rdr.ReadInt32();
Position = Position.Read(psr, rdr);
SlotObject1 = ObjectSlot.Read(psr, rdr);
SlotObject2 = ObjectSlot.Read(psr, rdr);
}
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:7,代码来源:InvSwapPacket.cs
示例14: Read
protected override void Read(ClientProcessor psr, NReader rdr)
{
BulletId = rdr.ReadByte();
OwnerId = rdr.ReadInt32();
ContainerType = rdr.ReadInt16();
Angle = rdr.ReadSingle();
}
开发者ID:lcnvdl,项目名称:rotmg-server,代码行数:7,代码来源:AllyShootPacket.cs
示例15: ServePolicyFile
private static void ServePolicyFile(IAsyncResult ar)
{
try
{
TcpClient cli = (ar.AsyncState as TcpListener).EndAcceptTcpClient(ar);
(ar.AsyncState as TcpListener).BeginAcceptTcpClient(ServePolicyFile, ar.AsyncState);
NetworkStream s = cli.GetStream();
NReader rdr = new NReader(s);
NWriter wtr = new NWriter(s);
if (rdr.ReadNullTerminatedString() == "<policy-file-request/>")
{
wtr.WriteNullTerminatedString(@"<cross-domain-policy>
<allow-access-from domain=""*"" to-ports=""*"" />
</cross-domain-policy>");
wtr.Write((byte)'\r');
wtr.Write((byte)'\n');
}
cli.Close();
}
catch (ObjectDisposedException) { }
catch (Exception ex)
{
logger.Error(ex);
}
}
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:25,代码来源:PolicyServer.cs
示例16: FromJson
public void FromJson(string json)
{
var obj = JsonConvert.DeserializeObject<json_dat>(json);
byte[] dat = ZlibStream.UncompressBuffer(obj.data);
Init(obj.width, obj.height);
using (var rdr = new NReader(new MemoryStream(dat)))
for (int y = 0; y < obj.height; y++)
for (int x = 0; x < obj.width; x++)
{
loc loc = obj.dict[rdr.ReadInt16()];
if (loc.ground != null)
Tiles[x][y] = (Tile) this.dat.IdToTileType[loc.ground];
else
Tiles[x][y] = (Tile) 0xff;
if (loc.objs != null)
{
//Entities[x][y] = new Entity[loc.objs.Length];
//int i = 0;
//foreach (var z in loc.objs)
//{
// Entities[x][y][i] = new Entity() { ObjectType = Objects.id2type[z.id], X = x, Y = y };
//}
}
}
}
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:25,代码来源:JsonMap.cs
示例17: Read
protected override void Read(NReader rdr)
{
Title = rdr.ReadUTF();
Message = rdr.ReadUTF();
Button1 = rdr.ReadUTF();
Button2 = rdr.ReadUTF();
Type = rdr.ReadUTF();
}
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:8,代码来源:TextBoxPacket.cs
示例18: Read
protected override void Read(Client psr, NReader rdr)
{
AccountId = rdr.ReadUTF();
CharId = rdr.ReadInt32();
Killer = rdr.ReadUTF();
obf0 = rdr.ReadInt32();
obf1 = rdr.ReadInt32();
}
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:8,代码来源:DeathPacket.cs
示例19: Read
protected override void Read(Client psr, NReader rdr)
{
AccountListId = rdr.ReadInt32();
AccountIds = new string[rdr.ReadInt16()];
for (int i = 0; i < AccountIds.Length; i++)
AccountIds[i] = rdr.ReadUTF();
LockAction = rdr.ReadInt32();
}
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:8,代码来源:AccountListPacket.cs
示例20: Read
protected override void Read(ClientProcessor psr, NReader rdr)
{
Title = rdr.ReadUTF();
Message = rdr.ReadUTF();
Button1 = rdr.ReadUTF();
Button2 = rdr.ReadUTF();
Type = rdr.ReadUTF();
}
开发者ID:Zeroeh,项目名称:PrivateServerOld,代码行数:8,代码来源:TextBoxPacket.cs
注:本文中的NReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论