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


C# NetIncomingMessage.ReadDouble方法代码示例

本文整理汇总了C#中Lidgren.Network.NetIncomingMessage.ReadDouble方法的典型用法代码示例。如果您正苦于以下问题:C# NetIncomingMessage.ReadDouble方法的具体用法?C# NetIncomingMessage.ReadDouble怎么用?C# NetIncomingMessage.ReadDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lidgren.Network.NetIncomingMessage的用法示例。


在下文中一共展示了NetIncomingMessage.ReadDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.Id = im.ReadInt32();
     this.MessageTime = im.ReadDouble();
     this.Health = im.ReadFloat();
     this.MaxHealth = im.ReadFloat();
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:7,代码来源:UpdateObjectHealthMessage.cs

示例2: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.MessageTime = im.ReadDouble();
     this.Id = im.ReadInt32();
     this.OldPosition = im.ReadInt32();
     this.NewPosition = im.ReadInt32();
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:7,代码来源:CreatureInventoryItemPositionChangeMessage.cs

示例3: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.MessageTime = im.ReadDouble();
     this.Id = im.ReadInt32();
     this.EquipmentPosition = im.ReadInt32();
     this.InventoryPosition = im.ReadInt32();
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:7,代码来源:CreatureInventoryToEquipmentMessage.cs

示例4: Decode

 public void Decode(NetIncomingMessage im)
 {
     Id = im.ReadInt64();
     MessageTime = im.ReadDouble();
     /*this.Position = im.ReadVector3();
     this.Velocity = im.ReadVector3();*/
     Rotation = im.ReadSingle();
 }
开发者ID:imGoose,项目名称:SkyrimOnline,代码行数:8,代码来源:UpdatePlayerStateMessage.cs

示例5: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.Id = im.ReadInt32();
     this.MessageTime = im.ReadDouble();
     this.MoveUp = im.ReadBoolean();
     this.MoveDown = im.ReadBoolean();
     this.MoveLeft = im.ReadBoolean();
     this.MoveRight = im.ReadBoolean();
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:9,代码来源:UpdateObjectMovementMessage.cs

示例6: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.Id = im.ReadInt32();
     this.MessageTime = im.ReadDouble();
     this.Position = im.ReadVector3();
     /*this.MoveUp = im.ReadBoolean();
     this.MoveDown = im.ReadBoolean();
     this.MoveLeft = im.ReadBoolean();
     this.MoveRight = im.ReadBoolean();*/
     this.Object = Utility.Serializer.DeserializeObjectFromString<Model.Object.Object>(im.ReadString());
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:11,代码来源:UpdateObjectMessage.cs

示例7: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.ServerName = im.ReadString();
     this.Description = im.ReadString();
     this.Intro = im.ReadString();
     this.Online = im.ReadByte();
     int roomsLength = im.ReadByte();
     for (int i = 0; i < roomsLength; i++)
     {
         Rooms.Add(new LobbySaveData(im.ReadString(), im.ReadInt16(), im.ReadString(), im.ReadByte(), im.ReadInt16(), im.ReadDouble()));
     }
 }
开发者ID:Express50,项目名称:Bricklayer,代码行数:12,代码来源:LobbyMessage.cs

示例8: Decode

        public void Decode(NetIncomingMessage im)
        {
            this.Id = im.ReadInt32();
            this.MessageTime = im.ReadDouble();

            //this.Region = Utility.Serializer.DeserializeObjectFromString<Model.Map.Region.Region>(im.ReadString());
            //this.Region.Parent = Model.Map.World.World.world;

            this.Position = im.ReadVector3();

            this.RegionEnum = (Model.Map.Region.RegionEnum)im.ReadInt32();
        }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:12,代码来源:UpdateRegionMessage.cs

示例9: Decode

        public void Decode(NetIncomingMessage im)
        {
            this.MessageTime = im.ReadDouble();
            int var_CountFactions = im.ReadInt32();

            this.factions = new List<Model.Behaviour.Member.Faction>();
            for (int i = 0; i < var_CountFactions; i++)
            {
                this.factions.Add(Utility.Serializer.DeserializeObjectFromString<Model.Behaviour.Member.Faction>(im.ReadString()));
            }
            this.value = new int[var_CountFactions, var_CountFactions];
            for (int y = 0; y < var_CountFactions; y++)
            {
                for (int x = 0; x < var_CountFactions; x++)
                {
                    this.value[y, x] = im.ReadInt32();
                    this.factions[y].BehaviourMember.Add(new BehaviourItem<Model.Behaviour.Member.Faction>(this.factions[x], this.value[y, x]));
                }
            }
        }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:20,代码来源:UpdateFactionsMessage.cs

示例10: Decode

        public void Decode(NetIncomingMessage im)
        {
            this.Id = im.ReadInt32();
            this.MessageTime = im.ReadDouble();
            this.RegionId = im.ReadInt32();

            //this.Chunk = Utility.Serializer.DeserializeObjectFromString<Model.Map.Chunk.Chunk>(im.ReadString());
            //this.Chunk.Parent = Model.Map.World.World.world.getRegion(this.RegionId);
            //this.Chunk.setAllNeighboursOfBlocks();

            this.Position = im.ReadVector3();

            Model.Map.Chunk.Chunk var_Chunk =  Model.Map.World.World.world.getChunkAtPosition(Position);

            if (var_Chunk != null)
            {
                if (var_Chunk.IsRequested)
                {
                    var_Chunk.IsRequested = false;
                }
            }
        }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:22,代码来源:UpdateChunkMessage.cs

示例11: Decode

        public void Decode(NetIncomingMessage im)
        {
            this.MessageTime = im.ReadDouble();
            this.ChunkId = im.ReadInt32();

            Microsoft.Xna.Framework.Vector3 var_Position = im.ReadVector3();

            this.Block = GameLibrary.Model.Map.World.World.world.getBlockAtCoordinate(var_Position);

            int var_Size = Enum.GetValues(typeof(GameLibrary.Model.Map.Block.BlockLayerEnum)).Length;

            if (this.Block != null)
            {
                if (this.Block.IsRequested)
                {
                    for (int i = 0; i < var_Size; i++)
                    {
                        this.Block.Layer[i] = (Model.Map.Block.BlockEnum)im.ReadInt32();
                    }
                }
                this.Block.IsRequested = false;
            }
        }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:23,代码来源:UpdateBlockMessage.cs

示例12: HandleEntityComponentNetworkMessage

 /// <summary>
 /// Handles an incoming entity component message
 /// </summary>
 /// <param name="message">Raw network message</param>
 /// <returns>An IncomingEntityComponentMessage object</returns>
 public IncomingEntityComponentMessage HandleEntityComponentNetworkMessage(NetIncomingMessage message)
 {
     var componentFamily = (ComponentFamily) message.ReadByte();
     var messageParams = new List<object>();
     while (message.Position < message.LengthBits)
     {
         switch ((NetworkDataType) message.ReadByte())
         {
             case NetworkDataType.d_enum:
                 messageParams.Add(message.ReadInt32());
                 break;
             case NetworkDataType.d_bool:
                 messageParams.Add(message.ReadBoolean());
                 break;
             case NetworkDataType.d_byte:
                 messageParams.Add(message.ReadByte());
                 break;
             case NetworkDataType.d_sbyte:
                 messageParams.Add(message.ReadSByte());
                 break;
             case NetworkDataType.d_ushort:
                 messageParams.Add(message.ReadUInt16());
                 break;
             case NetworkDataType.d_short:
                 messageParams.Add(message.ReadInt16());
                 break;
             case NetworkDataType.d_int:
                 messageParams.Add(message.ReadInt32());
                 break;
             case NetworkDataType.d_uint:
                 messageParams.Add(message.ReadUInt32());
                 break;
             case NetworkDataType.d_ulong:
                 messageParams.Add(message.ReadUInt64());
                 break;
             case NetworkDataType.d_long:
                 messageParams.Add(message.ReadInt64());
                 break;
             case NetworkDataType.d_float:
                 messageParams.Add(message.ReadFloat());
                 break;
             case NetworkDataType.d_double:
                 messageParams.Add(message.ReadDouble());
                 break;
             case NetworkDataType.d_string:
                 messageParams.Add(message.ReadString());
                 break;
             case NetworkDataType.d_byteArray:
                 int length = message.ReadInt32();
                 messageParams.Add(message.ReadBytes(length));
                 break;
         }
     }
     return new IncomingEntityComponentMessage(componentFamily, messageParams);
 }
开发者ID:Tri125,项目名称:space-station-14,代码行数:60,代码来源:EntityNetworkManager.cs

示例13: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.Id = im.ReadInt64();
     this.CardIndex = im.ReadInt16();
     this.MessageTime = im.ReadDouble();
 }
开发者ID:DuderBattalion,项目名称:MultiplayerProto,代码行数:6,代码来源:UpdatePlayerStateMessage.cs

示例14: Decode

 public void Decode(NetIncomingMessage im)
 {
     this.MessageTime = im.ReadDouble();
     this.Position = im.ReadVector3();
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:5,代码来源:RequestRegionMessage.cs

示例15: UnPackParams

 private List<object> UnPackParams(NetIncomingMessage message)
 {
     var messageParams = new List<object>();
     while (message.Position < message.LengthBits)
     {
         switch ((NetworkDataType) message.ReadByte())
         {
             case NetworkDataType.d_enum:
                 messageParams.Add(message.ReadInt32()); //Cast from int, because enums are ints.
                 break;
             case NetworkDataType.d_bool:
                 messageParams.Add(message.ReadBoolean());
                 break;
             case NetworkDataType.d_byte:
                 messageParams.Add(message.ReadByte());
                 break;
             case NetworkDataType.d_sbyte:
                 messageParams.Add(message.ReadSByte());
                 break;
             case NetworkDataType.d_ushort:
                 messageParams.Add(message.ReadUInt16());
                 break;
             case NetworkDataType.d_short:
                 messageParams.Add(message.ReadInt16());
                 break;
             case NetworkDataType.d_int:
                 messageParams.Add(message.ReadInt32());
                 break;
             case NetworkDataType.d_uint:
                 messageParams.Add(message.ReadUInt32());
                 break;
             case NetworkDataType.d_ulong:
                 messageParams.Add(message.ReadUInt64());
                 break;
             case NetworkDataType.d_long:
                 messageParams.Add(message.ReadInt64());
                 break;
             case NetworkDataType.d_float:
                 messageParams.Add(message.ReadFloat());
                 break;
             case NetworkDataType.d_double:
                 messageParams.Add(message.ReadDouble());
                 break;
             case NetworkDataType.d_string:
                 messageParams.Add(message.ReadString());
                 break;
             case NetworkDataType.d_byteArray:
                 int length = message.ReadInt32();
                 messageParams.Add(message.ReadBytes(length));
                 break;
         }
     }
     return messageParams;
 }
开发者ID:millpond,项目名称:space-station-14,代码行数:54,代码来源:EntityNetworkManager.cs


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