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


C# ReceiveDataReader.ReadSingle方法代码示例

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


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

示例1: Client_ReceiveLife

 void Client_ReceiveLife( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     float value = reader.ReadSingle();
     if( !reader.Complete() )
         return;
     Life = value;
 }
开发者ID:DarrenHassan,项目名称:GDM4242-GroupD,代码行数:7,代码来源:Dynamic.cs

示例2: Client_ReceiveWheelsPositionToClient

		void Client_ReceiveWheelsPositionToClient( RemoteEntityWorld sender, ReceiveDataReader reader )
		{
			networkingClient_wheelsRotationAngle = new Radian[ 4 ];
			networkingClient_wheelsSteer = new Radian[ 4 ];
			networkingClient_wheelsSuspensionJounce = new float[ 4 ];
			for( int n = 0; n < 4; n++ )
			{
				networkingClient_wheelsRotationAngle[ n ] = reader.ReadRadian();
				networkingClient_wheelsSteer[ n ] = reader.ReadRadian();
				networkingClient_wheelsSuspensionJounce[ n ] = reader.ReadSingle();
			}
			if( !reader.Complete() )
				return;
		}
开发者ID:whztt07,项目名称:NeoAxisCommunity,代码行数:14,代码来源:Car.cs

示例3: Client_ReceiveOpenSettings

 private void Client_ReceiveOpenSettings(RemoteEntityWorld sender, ReceiveDataReader reader)
 {
     bool value = reader.ReadBoolean();
     float value2 = reader.ReadSingle();
     if (!reader.Complete())
         return;
     opened = value;
     openDoorOffsetCoefficient = value2;
 }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:9,代码来源:Door.cs

示例4: Client_ReceiveTracksSpeed

 void Client_ReceiveTracksSpeed( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     float value1 = reader.ReadSingle();
     float value2 = reader.ReadSingle();
     if( !reader.Complete() )
         return;
     leftTrack.speed = value1;
     rightTrack.speed = value2;
 }
开发者ID:whztt07,项目名称:SDK,代码行数:9,代码来源:Tank.cs

示例5: Client_ReceiveContusionTimeRemaining

 void Client_ReceiveContusionTimeRemaining( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     float value = reader.ReadSingle();
     if( !reader.Complete() )
         return;
     ContusionTimeRemaining = value;
 }
开发者ID:DarrenHassan,项目名称:GDM4242-GroupD,代码行数:7,代码来源:PlayerCharacter.cs

示例6: 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

示例7: Client_ReceivePropertiesToClient

 void Client_ReceivePropertiesToClient( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     Size = reader.ReadVec2();
     Position = reader.ReadVec3();
     Segments = reader.ReadVec2i();
     RenderQueueGroup = (RenderQueueGroupID)reader.ReadVariableUInt32();
     ReflectionLevel = (ReflectionLevels)reader.ReadVariableUInt32();
     PhysicsHeight = reader.ReadSingle();
     DeepColor = reader.ReadColorValue();
     ShallowColor = reader.ReadColorValue();
     ReflectionColor = reader.ReadColorValue();
     ReflectionTextureSize = (ReflectionTextureSizes)reader.ReadVariableUInt32();
     FixedPipelineMap = reader.ReadString();
     FixedPipelineMapTiling = reader.ReadSingle();
     FixedPipelineColor = reader.ReadColorValue();
 }
开发者ID:CITS4242B2010,项目名称:project2010,代码行数:16,代码来源:WaterPlane.cs

示例8: Server_ReceiveControlKeyPress

        void Server_ReceiveControlKeyPress( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            //check to ensure that other players can not send messages to another player
            if( !Server_CheckRemoteEntityWorldAssociatedWithThisIntellect( sender ) )
                return;

            GameControlKeys controlKey = (GameControlKeys)reader.ReadVariableUInt32();
            float strength = reader.ReadSingle();
            if( !reader.Complete() )
                return;

            //check for invalid value
            if( !Enum.IsDefined( typeof( GameControlKeys ), (int)controlKey ) )
                return;
            if( strength <= 0 )
                return;

            ControlKeyPress( controlKey, strength );
        }
开发者ID:DarrenHassan,项目名称:GDM4242-GroupD,代码行数:19,代码来源:PlayerIntellect.cs

示例9: Client_ReceiveUpdateMechThroth

 private void Client_ReceiveUpdateMechThroth(RemoteEntityWorld sender, ReceiveDataReader reader)
 {
     float value = reader.ReadSingle();
     if (!reader.Complete())
         return;
     ThrottleF = value;
 }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:7,代码来源:Mech.cs

示例10: Client_ReceiveShield

 private void Client_ReceiveShield(RemoteEntityWorld sender, ReceiveDataReader reader)
 {
     float value = reader.ReadSingle();
     if (!reader.Complete())
         return;
     Shield = value;
 }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:7,代码来源:Dynamic.cs

示例11: Client_ReceiveRemainingTime

 private void Client_ReceiveRemainingTime(RemoteEntityWorld sender, ReceiveDataReader reader)
 {
     float value = reader.ReadSingle();
     if (!reader.Complete())
         return;
     RemainingTime = value;
 }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:7,代码来源:Influence.cs

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