public static extern bool FrameEnded(
			Handle self, 
			FrameEvent frameEvent);
		public static extern bool FrameRenderingQueued(
			Handle self, 
			FrameEvent frameEvent);
예제 #3
0
		/// <summary>
		/// Updates the by event.
		/// </summary>
		/// <param name="frameEvent">The frame event.</param>
		public void UpdateByEvent(FrameEvent frameEvent)
		{
			Elapsed = TimeSpan.FromSeconds(frameEvent.TimeSinceLastFrame);
			FromLastEvent = TimeSpan.FromSeconds(frameEvent.TimeSinceLastEvent);
		}
예제 #4
0
		protected virtual void UpdateScene(FrameEvent evt)
		{
		}
예제 #5
0
		protected virtual bool OnFrameRenderingQueued(FrameEvent evt)
		{
			if (Window.IsClosed)
				return false;

			if (ShutDown)
				return false;

			try {
				ProcessInput();

				UpdateScene(evt);

				CameraMan.UpdateCamera(evt.TimeSinceLastFrame);
				DebugOverlay.Update(evt.TimeSinceLastFrame);

				return true;

			} catch (ShutdownException) {
				ShutDown = true;
				return false;
			}
		}
예제 #6
0
		/// <summary>
		/// Called when [frame rendering queued].
		/// </summary>
		/// <param name="e">The e.</param>
		/// <returns></returns>
		private bool OnFrameRenderingQueued(FrameEvent e)
		{
			Game.Timer.UpdateByEvent(e);

			ApplyCustomLogic();

			IGameState currentState = Game.StateMachine.Current;

			if (currentState == null)
				return false;

			currentState.Update(Game.Timer);

			return Game.IsRunning && !Game.Variables.Ogre.RenderWindow.IsClosed;
		}