Beispiel #1
0
        public GameScreen(HUD hud, World world, ContentManager content, GraphicsDevice graphics)
        {
            this.Content = content;
            this.world = world;
            this.hud = hud;
            this.graphics = graphics;
            // Laad de muziek
            this.song = this.Content.Load<Song>("Audio/Soundtrack");

            // Repeat de muziek
            MediaPlayer.IsRepeating = true;
            // Plays de muziek
            MediaPlayer.Play(song);
        }
Beispiel #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            currentGameState = GameState.StartScreen;

            // Het laden van de HUD met score
            hud = new HUD();
            hud.Font = Content.Load<SpriteFont>("Fonts/Arial");

            // Laadt het spel, dus het zal het titel scherm moeten laden
            screen_start = new StartScreen(this);
            currentGameState = GameState.StartScreen;

            // Objecten en lijsten maken
            world = new World(new Vector2(0, 5.6f));

            base.LoadContent();
        }