Axiom.Demos.Dot3Bump.OnFrameStarted C# (CSharp) Метод

OnFrameStarted() защищенный Метод

protected OnFrameStarted ( object source, FrameEventArgs e ) : void
source object
e FrameEventArgs
Результат void
		protected override void OnFrameStarted( object source, FrameEventArgs e )
		{
			base.OnFrameStarted( source, e );

			timeDelay -= e.TimeSinceLastFrame;

			IfKeyPressed( KeyCodes.O, delegate()
			{
				entities[ currentEntity ].IsVisible = false;
				currentEntity = ( ++currentEntity ) % NUM_ENTITIES;
				entities[ currentEntity ].IsVisible = true;
				entities[ currentEntity ].MaterialName = materialNames[ currentEntity, currentMaterial ];

				objectInfo.Text = "Current: " + entityMeshes[ currentEntity ];
				materialInfo.Text = "Current: " + materialNames[ currentEntity, currentMaterial ];
			} );

			IfKeyPressed( KeyCodes.M, delegate()
			{
				currentMaterial = ( ++currentMaterial ) % NUM_MATERIALS;
				entities[ currentEntity ].MaterialName = materialNames[ currentEntity, currentMaterial ];

				materialInfo.Text = "Current: " + materialNames[ currentEntity, currentMaterial ];
			} );

			IfKeyPressed( KeyCodes.D1, delegate()
			{
				FlipLightState( 0 );
			} );

			IfKeyPressed( KeyCodes.D2, delegate()
			{
				FlipLightState( 1 );
			} );

			IfKeyPressed( KeyCodes.D3, delegate()
			{
				FlipLightState( 2 );
			} );

			// animate the lights
			for ( int i = 0; i < NUM_LIGHTS; i++ )
			{
				lightPivots[ i ].Rotate( Vector3.UnitZ, lightSpeeds[ i ] * e.TimeSinceLastFrame );
			}
		}