コード例 #1
0
ファイル: Game.cs プロジェクト: smack0007/Snowball_v1
        /// <summary>
        /// Constructor.
        /// </summary>
        public Game()
        {
            this.Services = new GameServicesContainer();

            this.gameWindow = new GameWindow();
            this.SubscribeGameWindowEvents();
            this.Services.AddService(typeof(IGameWindow), this.Window);

            this.gameClock = new GameClock();
            this.gameTime = new GameTime();
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: smack0007/Snowball_v1
 /// <summary>
 /// Called when the game is being disposed.
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.gameWindow != null)
         {
             this.UnsubscribeGameWindowEvents();
             this.gameWindow.Dispose();
             this.gameWindow = null;
         }
     }
 }