示例#1
0
 protected override void BeginRun()
 {
     // At this point, GraphicsDevice is initialized and set up.
     WebServerProcess.Start();
     SoundProcess.Start();
     LoaderProcess.Start();
     UpdaterProcess.Start();
     RenderProcess.Start();
     base.BeginRun();
 }
示例#2
0
 protected override void EndRun()
 {
     base.EndRun();
     RenderProcess.Stop();
     UpdaterProcess.Stop();
     LoaderProcess.Stop();
     SoundProcess.Stop();
     // WebServerProcess.Stop(); Again
     WebServerProcess.Stop();
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Game"/> based on the specified <see cref="UserSettings"/>.
 /// </summary>
 /// <param name="settings">The <see cref="UserSettings"/> for the game to use.</param>
 public Game(UserSettings settings)
 {
     Settings         = settings;
     ContentPath      = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "Content");
     Exiting         += new System.EventHandler <System.EventArgs>(Game_Exiting);
     RenderProcess    = new RenderProcess(this);
     UpdaterProcess   = new UpdaterProcess(this);
     LoaderProcess    = new LoaderProcess(this);
     SoundProcess     = new SoundProcess(this);
     WebServerProcess = new WebServerProcess(this);
     gameStates       = new Stack <GameState>();
 }