本文整理汇总了C#中PacketReader.ReadInt16方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.ReadInt16方法的具体用法?C# PacketReader.ReadInt16怎么用?C# PacketReader.ReadInt16使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketReader
的用法示例。
在下文中一共展示了PacketReader.ReadInt16方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public IDataObject Read(PacketReader r)
{
X = r.ReadInt16();
Y = r.ReadInt16();
Type = r.ReadUInt16();
return this;
}
示例2: Read
public override void Read(PacketReader r)
{
MyOffers = new bool[r.ReadInt16()];
for (int i = 0; i < MyOffers.Length; i++)
MyOffers[i] = r.ReadBoolean();
YourOffers = new bool[r.ReadInt16()];
for (int i = 0; i < YourOffers.Length; i++)
YourOffers[i] = r.ReadBoolean();
}
示例3: Read
public override void Read(PacketReader r)
{
MyItems = new Item[r.ReadInt16()];
for (int i = 0; i < MyItems.Length; i++)
MyItems[i] = (Item) new Item().Read(r);
YourName = r.ReadString();
YourItems = new Item[r.ReadInt16()];
for (int i = 0; i < YourItems.Length; i++)
YourItems[i] = (Item)new Item().Read(r);
}
示例4: ObjectInfo
/// <summary>
/// Creates a new ObjectInfo object.
/// </summary>
/// <param name="reader">A <see cref="PacketReader"/> containing packet data.</param>
public ObjectInfo(PacketReader reader) {
if (reader == null) {
throw new ArgumentNullException("reader");
}
X = reader.ReadInt16();
Y = reader.ReadInt16();
Zbyte = reader.ReadByte();
Flags = reader.ReadByte();
Index = reader.ReadByte();
Heading = reader.ReadByte();
}
示例5: CarContOBJ
/// <summary>
/// Creates a new <see cref="CarContOBJ"/> object.
/// </summary>
/// <param name="reader">A <see cref="PacketReader"/> contaning the data.</param>
public CarContOBJ(PacketReader reader) {
if (reader == null) {
throw new ArgumentNullException("reader");
}
Direction = reader.ReadByte();
Heading = reader.ReadByte();
Speed = reader.ReadByte();
reader.Skip(1);
X = reader.ReadInt16();
Y = reader.ReadInt16();
}
示例6: Read
public override void Read(PacketReader r)
{
Tiles = new Tile[r.ReadInt16()];
for (int i = 0; i < Tiles.Length; i++)
Tiles[i] = (Tile)new Tile().Read(r);
NewObjs = new Entity[r.ReadInt16()];
for (int i = 0; i < NewObjs.Length; i++)
NewObjs[i] = (Entity)new Entity().Read(r);
Drops = new int[r.ReadInt16()];
for (int i = 0; i < Drops.Length; i++)
Drops[i] = r.ReadInt32();
}
示例7: IS_OBH
/// <summary>
/// Creates a new <see cref="IS_OBH"/> object.
/// </summary>
/// <param name="buffer">The packet data.</param>
public IS_OBH(byte[] buffer) {
PacketReader reader = new PacketReader(buffer);
Size = reader.ReadByte();
Type = (PacketType)reader.ReadByte();
ReqI = reader.ReadByte();
PLID = reader.ReadByte();
SpClose = reader.ReadUInt16();
Time = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
C = new CarContOBJ(reader);
X = reader.ReadInt16();
Y = reader.ReadInt16();
reader.Skip(2);
Index = reader.ReadByte();
OBHFlags = (ObjectFlags)reader.ReadByte();
}
示例8: Read
public override void Read(PacketReader r)
{
BulletId = r.ReadByte();
OwnerId = r.ReadInt32();
ContainerType = r.ReadInt16();
Angle = r.ReadSingle();
}
示例9: Read
public IDataObject Read(PacketReader r)
{
ObjectType = r.ReadInt16();
Status.Read(r);
return this;
}
示例10: Read
public override void Read(PacketReader r)
{
Time = r.ReadInt32();
BulletId = r.ReadByte();
ContainerType = r.ReadInt16();
Position = (Location)new Location().Read(r);
Angle = r.ReadSingle();
}
示例11: Read
public IDataObject Read(PacketReader r)
{
ObjectId = r.ReadInt32();
SlotId = r.ReadByte();
ObjectType = r.ReadInt16();
return this;
}
示例12: Read
public override void Read(PacketReader r)
{
BulletId = r.ReadByte();
OwnerId = r.ReadInt32();
ContainerType = r.ReadInt32();
StartingLoc = (Location) new Location().Read(r);
Angle = r.ReadSingle();
Damage = r.ReadInt16();
}
示例13: Read
public override void Read(PacketReader r)
{
TickId = r.ReadInt32();
Time = r.ReadInt32();
NewPosition = (Location)new Location().Read(r);
Records = new LocationRecord[r.ReadInt16()];
for (int i = 0; i < Records.Length; i++)
Records[i] = (LocationRecord)new LocationRecord().Read(r);
}
示例14: Read
public override void Read(PacketReader r)
{
TickId = r.ReadInt32();
TickTime = r.ReadInt32();
Statuses = new Status[r.ReadInt16()];
for (int i = 0; i < Statuses.Length; i++)
Statuses[i] = (Status)new Status().Read(r);
}
示例15: Read
public override void Read(PacketReader r)
{
Location = (Location) new Location().Read(r);
Radius = r.ReadSingle();
Damage = r.ReadUInt16();
Effects = (ConditionEffectIndex)r.ReadByte();
EffectDuration = r.ReadSingle();
OriginType = r.ReadInt16();
}