Esempio n. 1
0
		/// <summary>
		/// Runs the specified app.
		/// </summary>
		/// <param name="app">The app.</param>
		public void Run(GameApplication app)
		{
			var config = new Configuration {
				Screen = {
					Width = 800,
					Height = 600,
					BackgroundColor = Color.Black
				}
			};

			app.Configure(config);

			while (app.IsRunning)
			{
				var state = app.StateMachine.Current;

				if (state == null)
					break;

				app.BeginScene();
				{
					var gameTime = app.Timer;
					state.Update(gameTime);
				}
				app.EndScene();
			}
		}
Esempio n. 2
0
		/// <summary>
		/// Initializes the specified app.
		/// </summary>
		/// <param name="app">The app.</param>
		protected virtual void Initialize(GameApplication app)
		{
			Tutano.ApplyCustomConfigurators();
			app.Configure(Tutano.Configuration);
			Tutano.InitializeGameStates();
		}