예제 #1
0
        public ACWGame()
        {
            //Create the graphics manager and configue it.
            #region Graphics Manager Initialisation
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth = WIDTH;
            graphics.PreferredBackBufferHeight = HEIGHT;
            graphics.IsFullScreen = FULLSCREEN;

            graphics.ApplyChanges();
            #endregion

            //Configure the Content directory for assets.
            Content.RootDirectory = "Content";

            backgroundRect = new Rectangle(0, 0, WIDTH, HEIGHT);

            currentState = new MainMenuState(this);
            //currentState = new GameState(this, gameSeed);
        }
예제 #2
0
 /**
  * This is used to change the current state of the game.
  */
 public void SetState(State s)
 {
     if (ACWGame.SOUND_ENABLED) ResourceManager.blip.Play();
     currentState = s;
 }