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


C# ReceiveDataReader.ReadVariableInt32方法代码示例

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


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

示例1: Client_ReceiveUpdateBulletCount

 void Client_ReceiveUpdateBulletCount( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     normalMode.BulletCount = reader.ReadVariableInt32();
     normalMode.BulletMagazineCount = reader.ReadVariableInt32();
     alternativeMode.BulletCount = reader.ReadVariableInt32();
     alternativeMode.BulletMagazineCount = reader.ReadVariableInt32();
 }
开发者ID:whztt07,项目名称:SDK,代码行数:7,代码来源:Gun.cs

示例2: Client_ReceiveUpdateRunEnergy

        private void Client_ReceiveUpdateRunEnergy(RemoteEntityWorld sender, ReceiveDataReader reader)
        {
            int value = reader.ReadVariableInt32();
            if (!reader.Complete())
                return;

            RunEnergy = value;
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:8,代码来源:AKCharacter.cs

示例3: Client_ReceiveUpdateData

        void Client_ReceiveUpdateData( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            while( reader.BitPosition < reader.EndBitPosition )
            {
                uint identifier = reader.ReadVariableUInt32();
                int frags = reader.ReadVariableInt32();
                float ping = reader.ReadSingle();

                Client_Player player = Client_GetPlayer( identifier );

                if( player != null )
                {
                    player.Frags = frags;
                    player.Ping = ping;
                }
            }
        }
开发者ID:whztt07,项目名称:SDK,代码行数:17,代码来源:PlayerManager.cs

示例4: Client_ReceiveSpawnId

 private void Client_ReceiveSpawnId(RemoteEntityWorld sender, ReceiveDataReader reader)
 {
     int spawnId = reader.ReadVariableInt32();
     if (!reader.Complete())
         return;
     spawnid = (SpawnId)spawnId;// EntityTypes.Instance.GetByName(s);
 }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:7,代码来源:SpawnPoint.cs

示例5: Client_ReceiveAddUser

        void Client_ReceiveAddUser( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            uint identifier = reader.ReadVariableUInt32();
            string name = reader.ReadString();
            bool bot = reader.ReadBoolean();
            int team = reader.ReadVariableInt32();
            uint userIdentifier = reader.ReadVariableUInt32();

            if( !reader.Complete() )
                return;

            //check for already exists
            {
                Client_Player playerForCheck = Client_GetPlayer( identifier );

                if( playerForCheck != null )
                {
                    Log.Fatal( "PlayerManager: Client_ReceiveAddUserToClient: Player " +
                        "with identifier \"{0}\" is already exists.", identifier );
                }
            }

            UserManagementClientNetworkService.UserInfo user = null;
            if( userIdentifier != 0 )
                user = GameNetworkClient.Instance.UserManagementService.GetUser( userIdentifier );

            Client_Player player = new Client_Player( identifier, name, bot, user );
            client_players.Add( player );
        }
开发者ID:yoda,项目名称:gamedesign,代码行数:29,代码来源:PlayerManager.cs

示例6: Client_ReceiveUpdateData

        private void Client_ReceiveUpdateData(RemoteEntityWorld sender, ReceiveDataReader reader)
        {
            while (reader.BitPosition < reader.EndBitPosition)
            {
                uint identifier = reader.ReadVariableUInt32();
                int hitPoints = reader.ReadVariableInt32();
                int killPoints = reader.ReadVariableInt32();
                int assaultCredits = reader.ReadVariableInt32();
                float ping = reader.ReadSingle();

                Client_Player player = Client_GetPlayer(identifier);

                if (player != null)
                {
                    player.HitPoints = hitPoints;
                    player.KillPoints = killPoints;
                    player.AssaultCredits = assaultCredits;
                    player.Ping = ping;
                }
            }
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:21,代码来源:PlayerManager.cs


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