コード例 #1
0
 public ExampleGame()
 {
     GlobalGameWindow.Init(this);
     graphics = GlobalGameWindow.Window;
     Content.RootDirectory              = "Content";
     IsMouseVisible                     = true;
     graphics.PreferredBackBufferWidth  = 1280;
     graphics.PreferredBackBufferHeight = 720;
 }
コード例 #2
0
 public static void Init(Game game)
 {
     if (instance == null)
     {
         instance = new GlobalGameWindow {
             graphicsDeviceManager = new GraphicsDeviceManager(game)
         };
     }
     else
     {
         throw new Exception("Instance already created.");
     }
 }