/// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Main game = new Main())
     {
         game.Run();
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes the world
 /// </summary>
 /// <param name="game">Game instance</param>
 private World(Main game)
 {
     this.main = game;
     foreach(DisplayMode displayMode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
     {
         Resolutions[displayModes] = new Vector2(displayMode.Width, displayMode.Height);
         displayModes++;
     }
     windDirection = new Vector2(1.0f, 0.0f);
     cameraViewArea = new Rectangle();
 }
Exemple #3
0
 /// <summary>
 /// Initializes the world
 /// </summary>
 /// <param name="game">Game instance</param>
 public static void Initialize(Main game)
 {
     if (instance != null)
         throw new StackOverflowException("World.Initialize can only be called once.");
     instance = new World(game);
 }