コード例 #1
0
ファイル: SoftProGame.cs プロジェクト: splateaux/OutOfOffice
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 /// <param name="args">The arguments.</param>
 private static void Main(string[] args)
 {
     using (SoftProGame game = new SoftProGame())
     {
         game.Run();
     }
 }
コード例 #2
0
        /// <summary>
        /// Constructs a new screen manager component.
        /// </summary>
        public ScreenManager(SoftProGame game)
            : base(game)
        {
            this._pointManager          = new ObjectValueManager();
            this._settingsManager       = new SettingsManager();
            this._site                  = game.Services;
            this._content               = new ContentManager(this._site, "Content");
            this._graphicsDeviceService = this._site.GetService <IGraphicsDeviceService>();
            this._input                 = new InputState(game);
            this._soundManager          = new SoundEffectManager();
            this._graphicsManager       = game.Graphics;

            if (this._graphicsDeviceService == null)
            {
                throw new InvalidOperationException("No graphics device service.");
            }

            this.KeyboardDispatcher = new KeyboardDispatcher(game.Window);
        }