示例#1
0
 // The entry point of the program.
 static void Main(string[] args)
 {
     // Creates and runs the game.
     using (GameBase game = new GameBase(args)) {
         game.Run();
     }
 }
示例#2
0
 //-----------------------------------------------------------------------------
 // Constructors
 //-----------------------------------------------------------------------------
 public GameManager(string[] launchParameters)
 {
     this.gameBase = null;
     this.gameScale = 4;
     this.debugMode = false;
     this.launchParameters = launchParameters;
 }
示例#3
0
        // 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();
        }
示例#4
0
 // Uninitializes the game manager.
 public void Uninitialize()
 {
     this.gameBase = null;
 }
示例#5
0
        //-----------------------------------------------------------------------------
        // 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);
        }
示例#6
0
        // 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();
        }
示例#7
0
 // Uninitializes the game manager.
 public void Uninitialize()
 {
     this.gameBase = null;
 }