示例#1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            fontLoader  = new FontLoader(Content);
            playing     = new PlayingStateClass(graphics, GraphicsDevice, Content);
            titleScreen = new TitleScreenClass(Content, GraphicsDevice, new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight));
            loading     = new LoadingScreenClass(Content, null, false);

            Mouse.SetPosition(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2);

            menu = new MainMenuStateClass(Content, new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight), true);

            ChangeGameState(CurrentGameState);

            buttonSound      = Content.Load <SoundEffect>("Sounds/button");
            buttonClickSound = Content.Load <SoundEffect>("Sounds/buttonClick");
            backSound        = Content.Load <SoundEffect>("Sounds/back");
        }
示例#2
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            fontLoader = new FontLoader(Content);
            playing = new PlayingStateClass(graphics, GraphicsDevice, Content);
            titleScreen = new TitleScreenClass(Content, GraphicsDevice, new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight));
            loading = new LoadingScreenClass(Content, null, false);

            Mouse.SetPosition(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2);

            menu = new MainMenuStateClass(Content, new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight), true);

            ChangeGameState(CurrentGameState);

            buttonSound = Content.Load<SoundEffect>("Sounds/button");
            buttonClickSound = Content.Load<SoundEffect>("Sounds/buttonClick");
            backSound = Content.Load<SoundEffect>("Sounds/back");
        }