当前位置: 首页>>代码示例>>C#>>正文


C# PacketReader.ReadInt16方法代码示例

本文整理汇总了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;
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:8,代码来源:Tile.cs

示例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();
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:10,代码来源:AcceptTradePacket.cs

示例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);
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:11,代码来源:TradeStartPacket.cs

示例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();
        }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:16,代码来源:ObjectInfo.cs

示例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();
        }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:16,代码来源:CarContOBJ.cs

示例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();
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:14,代码来源:UpdatePacket.cs

示例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();
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:19,代码来源:IS_OBH.cs

示例8: Read

 public override void Read(PacketReader r)
 {
     BulletId = r.ReadByte();
     OwnerId = r.ReadInt32();
     ContainerType = r.ReadInt16();
     Angle = r.ReadSingle();
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:7,代码来源:AllyShootPacket.cs

示例9: Read

        public IDataObject Read(PacketReader r)
        {
            ObjectType = r.ReadInt16();
            Status.Read(r);

            return this;
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:7,代码来源:Entity.cs

示例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();
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:8,代码来源:PlayerShootPacket.cs

示例11: Read

        public IDataObject Read(PacketReader r)
        {
            ObjectId = r.ReadInt32();
            SlotId = r.ReadByte();
            ObjectType = r.ReadInt16();

            return this;
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:8,代码来源:SlotObject.cs

示例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();
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:9,代码来源:Shoot2Packet.cs

示例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);
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:9,代码来源:MovePacket.cs

示例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);
        }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:9,代码来源:NewTickPacket.cs

示例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();
 }
开发者ID:JuixGames,项目名称:K_Relay,代码行数:9,代码来源:AoEPacket.cs


注:本文中的PacketReader.ReadInt16方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。