Beispiel #1
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();
        }
Beispiel #2
0
        /// <summary>
        /// Begint het spel,
        /// wanneer het spel begonnen is,
        /// zet hij het huidige scherm op spel scherm (game screen)
        /// 
        /// Misschien een soort refresh actie erin?
        /// </summary>
        public void StartGame()
        {
            // Hij hoort eigenlijk alles te resetten

            screen_game = new GameScreen(this.hud, this.world, this.Content, this.GraphicsDevice);
            currentGameState = GameState.GameScreen;

            world = new World(new Vector2(0, 9.8f));

            screen_game.LoadContent();

            screen_start = null; // ??
        }