コード例 #1
0
ファイル: Game.cs プロジェクト: yinwuu/openrails
 protected override bool BeginDraw()
 {
     if (!base.BeginDraw())
         return false;
     RenderProcess.BeginDraw();
     return true;
 }
コード例 #2
0
 protected override void EndRun()
 {
     base.EndRun();
     WatchdogProcess.Stop();
     RenderProcess.Stop();
     UpdaterProcess.Stop();
     LoaderProcess.Stop();
     SoundProcess.Stop();
 }
コード例 #3
0
 protected override bool BeginDraw()
 {
     if (!base.BeginDraw())
     {
         return(false);
     }
     RenderProcess.BeginDraw();
     return(true);
 }
コード例 #4
0
 protected override void BeginRun()
 {
     // At this point, GraphicsDevice is initialized and set up.
     SoundProcess.Start();
     LoaderProcess.Start();
     UpdaterProcess.Start();
     RenderProcess.Start();
     WatchdogProcess.Start();
     base.BeginRun();
 }
コード例 #5
0
ファイル: Game.cs プロジェクト: yinwuu/openrails
 protected override void Update(Microsoft.Xna.Framework.GameTime gameTime)
 {
     // The first Update() is called before the window is displayed, with a gameTime == 0. The second is called
     // after the window is displayed.
     if (State == null)
         Exit();
     else
         RenderProcess.Update(gameTime);
     base.Update(gameTime);
 }
コード例 #6
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(Game_Exiting);
     WatchdogProcess = new WatchdogProcess(this);
     RenderProcess   = new RenderProcess(this);
     UpdaterProcess  = new UpdaterProcess(this);
     LoaderProcess   = new LoaderProcess(this);
     SoundProcess    = new SoundProcess(this);
     States          = new Stack <GameState>();
 }
コード例 #7
0
 protected override void EndDraw()
 {
     RenderProcess.EndDraw();
     base.EndDraw();
 }
コード例 #8
0
 protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime)
 {
     RenderProcess.Draw();
     base.Draw(gameTime);
 }