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


C# ReceiveDataReader.ReadBoolean方法代码示例

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


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

示例1: Client_ReceiveMoveFinish

        void Client_ReceiveMoveFinish( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            bool putToDestinationPlace = reader.ReadBoolean();
            bool completePuzzle = reader.ReadBoolean();
            if( !reader.Complete() )
                return;

            client_movingByUser = null;

            //play sounds
            if( putToDestinationPlace )
                ClientOrSingle_SoundPlay( "Maps\\JigsawPuzzleGame\\PutToDestinationPlace.ogg" );
            if( completePuzzle )
                ClientOrSingle_SoundPlay( "Maps\\JigsawPuzzleGame\\CompletePuzzle.ogg" );
        }
开发者ID:whztt07,项目名称:SDK,代码行数:15,代码来源:JigsawPuzzlePiece.cs

示例2: Client_ReceiveCreateBulletEvent

        void Client_ReceiveCreateBulletEvent( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            bool alternativeModeFlag = reader.ReadBoolean();

            if( !reader.Complete() )
                return;

            Mode mode = alternativeModeFlag ? alternativeMode : normalMode;

            SoundPlay3D( mode.typeMode.SoundFire, .5f, true );
            mode.typeMode.FireObjects.CreateObjectsOfOneRandomSelectedGroup( this );
        }
开发者ID:whztt07,项目名称:SDK,代码行数:12,代码来源:Gun.cs

示例3: ReceiveMessage_AddUserToClient

        private bool ReceiveMessage_AddUserToClient(NetworkNode.ConnectedNode sender,
            MessageType messageType, ReceiveDataReader reader, ref string additionalErrorMessage)
        {
            //get data from message
            uint identifier = reader.ReadVariableUInt32();
            string name = reader.ReadString();
            bool thisUserFlag = reader.ReadBoolean();
            if (!reader.Complete())
                return false;

            AddUser(identifier, name, thisUserFlag);

            return true;
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:14,代码来源:UserManagementNetworkService.cs

示例4: ReceiveMessage_WorldDestroyToClient

        private bool ReceiveMessage_WorldDestroyToClient(NetworkNode.ConnectedNode sender,
            MessageType messageType, ReceiveDataReader reader, ref string additionalErrorMessage)
        {
            bool newMapWillBeLoaded = reader.ReadBoolean();
            if (!reader.Complete())
                return false;

            if (WorldDestroy != null)
                WorldDestroy(this, newMapWillBeLoaded);

            if (EntitySystemWorld.Instance != null && networkingInterface != null)
            {
                if (serverRemoteEntityWorld != null)
                    networkingInterface.DisconnectRemoteEntityWorld(serverRemoteEntityWorld);
            }
            serverRemoteEntityWorld = null;

            return true;
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:19,代码来源:EntitySystemNetworkService.cs

示例5: Client_ReceiveDieCall

 void Client_ReceiveDieCall( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     MapObject prejudicial = Entities.Instance.GetByNetworkUIN( reader.ReadVariableUInt32() ) as MapObject;
     bool allowLatencyTime = reader.ReadBoolean();
     if( !reader.Complete() )
         return;
     Die( prejudicial, allowLatencyTime );
 }
开发者ID:whztt07,项目名称:SDK,代码行数:8,代码来源:Dynamic.cs

示例6: Client_ReceiveSoundPlayKick

 void Client_ReceiveSoundPlayKick( RemoteEntityWorld sender, ReceiveDataReader reader )
 {
     bool alternative = reader.ReadBoolean();
     if( !reader.Complete() )
         return;
     MeleeWeaponType.MeleeWeaponMode typeMode = alternative ?
         Type.AlternativeMode : Type.NormalMode;
     SoundPlay3D( typeMode.SoundKick, .5f, false );
 }
开发者ID:CITS4242B2010,项目名称:project2010,代码行数:9,代码来源:MeleeWeapon.cs

示例7: Client_ReceiveAddUser

        void Client_ReceiveAddUser( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            uint identifier = reader.ReadVariableUInt32();
            string name = reader.ReadString();
            bool bot = reader.ReadBoolean();
            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:whztt07,项目名称:SDK,代码行数:28,代码来源:PlayerManager.cs

示例8: Client_ReceiveBodiesPositions

        void Client_ReceiveBodiesPositions( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            //clear snapshots cache if entity is not created
            if( !IsPostCreated )
                client_receivePositionsSnapshots.Clear();

            //check for invalid snapshot cache
            if( client_receivePositionsSnapshots.Count != 0 )
            {
                Client_ReceivePositionsSnapshot lastSnapshot = client_receivePositionsSnapshots[
                    client_receivePositionsSnapshots.Count - 1 ];
                if( lastSnapshot.bodies == null )
                {
                    //remove snapshot cache
                    client_receivePositionsSnapshots.Clear();
                }
            }

            int count = (int)reader.ReadVariableUInt32();

            Client_ReceivePositionsSnapshot snapshot = new Client_ReceivePositionsSnapshot();
            snapshot.networkTickNumber = EntitySystemWorld.Instance.NetworkTickCounter;

            snapshot.bodies = new Client_ReceivePositionsSnapshot.BodyItem[ count ];

            //receive bodies positions and rotations
            for( int n = 0; n < count; n++ )
            {
                Client_ReceivePositionsSnapshot.BodyItem bodyItem = new
                    Client_ReceivePositionsSnapshot.BodyItem();

                //read position
                if( reader.ReadBoolean() )
                {
                    bodyItem.position = reader.ReadVec3();
                }
                else
                {
                    //get position from previous snapshot
                    if( client_receivePositionsSnapshots.Count != 0 )
                    {
                        bodyItem.position = client_receivePositionsSnapshots[
                            client_receivePositionsSnapshots.Count - 1 ].bodies[ n ].position;
                    }
                }

                //read rotation
                if( reader.ReadBoolean() )
                {
                    bodyItem.rotation = reader.ReadQuat( 16 );
                }
                else
                {
                    //get rotation from previous snapshot
                    if( client_receivePositionsSnapshots.Count != 0 )
                    {
                        bodyItem.rotation = client_receivePositionsSnapshots[
                            client_receivePositionsSnapshots.Count - 1 ].bodies[ n ].rotation;
                    }
                }

                snapshot.bodies[ n ] = bodyItem;
            }

            if( !reader.Complete() )
                return;

            client_receivePositionsSnapshots.Add( snapshot );

            if( IsPostCreated )
                Client_UpdatePositionsBySnapshots( false );
        }
开发者ID:DarrenHassan,项目名称:GDM4242-GroupD,代码行数:72,代码来源:Dynamic.cs

示例9: Client_ReceivePropertiesToClient

		void Client_ReceivePropertiesToClient( RemoteEntityWorld sender, ReceiveDataReader reader )
		{
			Size = reader.ReadVec2();
			Position = reader.ReadVec3();
			Segments = reader.ReadVec2I();
			CustomMesh = reader.ReadString();
			RenderQueueGroup = (RenderQueueGroups)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();
			UseHDRTexture = reader.ReadBoolean();
			AllowFog = reader.ReadBoolean();
		}
开发者ID:whztt07,项目名称:NeoAxisCommunity,代码行数:19,代码来源:WaterPlane.cs

示例10: Client_ReceiveIntellect

        void Client_ReceiveIntellect( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            uint networkUIN = reader.ReadVariableUInt32();
            bool shouldDeleteAfterDetach = reader.ReadBoolean();
            if( !reader.Complete() )
                return;

            Intellect i = null;
            if( networkUIN != 0 )
                i = (Intellect)Entities.Instance.GetByNetworkUIN( networkUIN );
            SetIntellect( i, shouldDeleteAfterDetach );
        }
开发者ID:yoda,项目名称:gamedesign,代码行数:12,代码来源:Unit.cs

示例11: Client_ReceiveUpdateMasc

        private void Client_ReceiveUpdateMasc(RemoteEntityWorld sender, ReceiveDataReader reader)
        {
            bool value = reader.ReadBoolean();
            if (!reader.Complete())
                return;
            mascOn = value;

            if (mascOn)
            {
                mascSpeed = Type.MaxForwardSpeed * 2;
                mascForce = Type.DriveForwardForce * 2;
            }
            else
            {
                mascSpeed = 0;
                mascForce = 0;
            }
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:18,代码来源:Mech.cs

示例12: Client_ReceiveUpdateMechBoster

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

示例13: Client_ReceiveIntellect

        private void Client_ReceiveIntellect(RemoteEntityWorld sender, ReceiveDataReader reader)
        {
            uint networkUIN = reader.ReadVariableUInt32();
            bool shouldDeleteAfterDetach = reader.ReadBoolean();
            FactionType ft = null;

            if (GameMap.Instance.GameType == GameMap.GameTypes.AssaultKnights)
            {
                string factionName = reader.ReadString();
                if (factionName != string.Empty)
                    ft = (FactionType)EntityTypes.Instance.GetByName(factionName);
            }
            if (!reader.Complete())
                return;

            Intellect i = null;
            if (networkUIN != 0)
            {
                i = (Intellect)Entities.Instance.GetByNetworkUIN(networkUIN);
                if (ft != null)
                    i.Faction = ft;
            }
            SetIntellect(i, shouldDeleteAfterDetach);
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:24,代码来源:Unit.cs

示例14: Client_ReceiveFireEvent

        void Client_ReceiveFireEvent( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            bool alternative = reader.ReadBoolean();
            if( !reader.Complete() )
                return;

            GunType.GunMode typeMode = alternative ? Type.AlternativeMode : Type.NormalMode;
            OnFire( typeMode );
        }
开发者ID:whztt07,项目名称:SDK,代码行数:9,代码来源:Gun.cs

示例15: Client_ReceiveAlternativeMode

 private void Client_ReceiveAlternativeMode(RemoteEntityWorld sender, ReceiveDataReader reader)
 {
     bool value = reader.ReadBoolean();
     if (!reader.Complete())
         return;
     AlternativeMode = value;
 }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:7,代码来源:PhysicalStream.cs


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