Beispiel #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            startMenu   = new StartMenu(Content);
            ScreenManager.Instance.graphicsDevice = GraphicsDevice;
            ScreenManager.Instance.spriteBatch    = spriteBatch;
            ScreenManager.Instance.LoadContent(Content);
            square         = Content.Load <Texture2D>("plattform");
            tileSheet      = Content.Load <Texture2D>("theSprite");
            spriteFont     = Content.Load <SpriteFont>("spriteFont");
            crosshairTex   = Content.Load <Texture2D>("crosshair");
            healthBarTex   = Content.Load <Texture2D>("healthbartex");
            rifleTex       = Content.Load <Texture2D>("rifleTex");
            charTex        = Content.Load <Texture2D>("Texture_Pack_Characters");
            healthTex      = Content.Load <Texture2D>("health");
            ammoTex        = Content.Load <Texture2D>("ammo");
            handgunTex     = Content.Load <Texture2D>("handgunTex");
            unarmedTex     = Content.Load <Texture2D>("unarmedTex");
            lvl1Screen     = Content.Load <Texture2D>("lvl1screen");
            crateTex       = Content.Load <Texture2D>("crate");
            friendlyProTex = Content.Load <Texture2D>("fpro");
            clickedSound   = Content.Load <SoundEffect>("threeTone2");
            yellowProTex   = Content.Load <Texture2D>("yellowPro");
            redProTex      = Content.Load <Texture2D>("redPro");
            greenProTex    = Content.Load <Texture2D>("greenPro");
            gameOverScreen = Content.Load <Texture2D>("gameOverScreen");
            lvl1Won        = Content.Load <Texture2D>("Level1won");
            gameSong       = Content.Load <Song>("Gesaffelstein - Viol");
            Viewport view = GraphicsDevice.Viewport;

            camera           = new Camera(view);
            currentGameState = GameStates.splash;
            gameBoard        = new GameBoard(screenWidth, screenHeight);
            hud = new HUD(gameBoard.Player);
        }
Beispiel #2
0
 private void Reload()
 {
     currentGameState = GameStates.startMenu;
     startMenu        = new StartMenu(Content);
     gameBoard        = new GameBoard(screenWidth, screenHeight);
 }