Esempio n. 1
0
        /// <summary>
        /// LoadContent wird einmal pro Spiel aufgerufen und ist der Platz, wo
        /// Ihr gesamter Content geladen wird.
        /// </summary>
        protected override void LoadContent()
        {
            this.gameState = GameState.Load;
            //TRIAL MODE?
            Guide.SimulateTrialMode = true;

            level = new Level(this, GraphicsDevice);
            level.LoadMap(@"Leveltry");
            level.scrollypos(300);

            // Erstellen Sie einen neuen SpriteBatch, der zum Zeichnen von Texturen verwendet werden kann.
            spriteBatchMario = new SpriteBatch(GraphicsDevice);
            spriteBatchTurtleShell = new SpriteBatch(GraphicsDevice);
            spriteBatchSplash = new SpriteBatch(GraphicsDevice);

            //Menü
            menu = new Menu(this.Content, spriteBatchMario, graphics);

            // TODO: Verwenden Sie this.Content, um Ihren Spiel-Inhalt hier zu laden
            mario = new Player();
            mario.LoadGraphic(1, 3, 60, 35, 8);
            mario.LoadGraphicRight(Content.Load<Texture2D>(@"marioright"));
            mario.LoadGraphicLeft(Content.Load<Texture2D>(@"marioleft"));
            mario.LoadGraphicStanding(Content.Load<Texture2D>(@"mariostanding"));
            mario.LoadGraphicJumping(Content.Load<Texture2D>(@"mariojump"));
            mario.startposy = graphics.GraphicsDevice.Viewport.Height - 100;
            mario.setPosy(mario.startposy);
            mario.startposx = 20;
            mario.setPosx(mario.startposx);
            mario.setGraphics(this.graphics);

            //shell = new Enemy(graphics.GraphicsDevice.Viewport.Width - 20, graphics.GraphicsDevice.Viewport.Height-50);
            //shell.LoadGraphic(1, 2, 15, 15, 2);
            //shell.LoadGraphicLeft(Content.Load<Texture2D>(@"turtleshell"));
            //shell.LoadGraphicRight(Content.Load<Texture2D>(@"turtleshell"));
            //shell.startDirection(false);
            //shell.setGraphics(this.graphics);
        }