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


C# IValueReader.ReadUInt32方法代码示例

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


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

示例1: ReadPayload

        public override void ReadPayload(IValueReader reader)
        {
            this.NetworkID = reader.ReadUInt32();
            this.CharacterName = reader.ReadString();

            this.Action = (PlayerUpdateAction)reader.ReadByte();
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:7,代码来源:PlayerUpdateMessage.cs

示例2: ReadEntity

        private NetworkEntity ReadEntity(ISerializationContext context, IValueReader reader)
        {
            var entity = new NetworkEntity (reader.ReadString (), EntityType.Client);
            entity.NetworkID = reader.ReadUInt32();

            int fieldCount = reader.ReadInt32 ();

            for (int f = 0; f < fieldCount; f++)
            {
                string name = reader.ReadString ();
                ushort typeID = reader.ReadUInt16();

                Type type;
                context.TypeMap.TryGetType (typeID, out type);

                object value;

                if (type == typeof (Vector2))
                    value = reader.Read (context, Vector2Serializer.Instance);
                else if (type == typeof (Vector3))
                    value = reader.Read (context, Vector3Serializer.Instance);
                else if (type == typeof (string))
                    value = reader.ReadString();
                else
                    value = reader.Read (context);

                entity.Fields.Add (name, new PropertyGroup (value, type));
            }

            return entity;
        }
开发者ID:strager,项目名称:Cinco,代码行数:31,代码来源:EntitySnapshotMessage.cs

示例3: ReadPayload

        public override void ReadPayload(IValueReader reader)
        {
            this.NetworkID = reader.ReadUInt32 ();

            this.X = reader.ReadInt32 ();
            this.Y = reader.ReadInt32 ();
            this.Direction = reader.ReadInt32 ();

            this.Animation = reader.ReadString ();
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerMovementMessage.cs

示例4: ReadPayload

 public override void ReadPayload(IValueReader reader)
 {
     this.NetworkID = reader.ReadUInt32();
 }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:4,代码来源:LogoutMessage.cs

示例5: ReadPayload

 public override void ReadPayload(IValueReader reader)
 {
     this.NetworkID = reader.ReadUInt32 ();
     this.Activation = (ActivationTypes) reader.ReadInt32 ();
 }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:5,代码来源:ClientEventRequestMessage.cs

示例6: ReadPayload

 public override void ReadPayload(IValueReader reader)
 {
     this.RequestedPlayerNetworkID = reader.ReadUInt32();
 }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:4,代码来源:PlayerRequestMessage.cs

示例7: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     EntityID = reader.ReadUInt32 ();
 }
开发者ID:NullSoldier,项目名称:Cinco,代码行数:4,代码来源:DestroyEntityMessage.cs


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