// The entry point of the program. static void Main(string[] args) { // Creates and runs the game. using (GameBase game = new GameBase(args)) { game.Run(); } }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- public GameManager(string[] launchParameters) { this.gameBase = null; this.gameScale = 4; this.debugMode = false; this.launchParameters = launchParameters; }
// Initializes the game manager. public void Initialize(GameBase gameBase) { this.gameBase = gameBase; elapsedTicks = 0; FormatCodes.Initialize(); Controls.Initialize(); ScreenResized(); AudioSystem.MasterVolume = 0.1f; // Begin the game state stack with a RoomControl. gameStateStack = new GameStateStack(new StateDummy()); gameStateStack.Begin(this); gameControl = new GameControl(this); gameControl.StartGame(); }
// Uninitializes the game manager. public void Uninitialize() { this.gameBase = null; }
//----------------------------------------------------------------------------- // Content //----------------------------------------------------------------------------- // Called to load game manager content. public void LoadContent(ContentManager content, GameBase gameBase) { this.gameBase = gameBase; GameData.Initialize(); // Setup the render targets GameData.RenderTargetGame = new RenderTarget2D(gameBase.GraphicsDevice, GameSettings.SCREEN_WIDTH, GameSettings.SCREEN_HEIGHT); GameData.RenderTargetGameTemp = new RenderTarget2D(gameBase.GraphicsDevice, GameSettings.SCREEN_WIDTH, GameSettings.SCREEN_HEIGHT); }