Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Services.AddService(typeof(SpriteBatch), spriteBatch);

            rgbFont = Content.Load<SpriteFont>("RGBFont");

            background = Content.Load<Texture2D>("RGBLogo");
            playerTexture = Content.Load<Texture2D>("grannyweatherwax");
            muisTexture = Content.Load<Texture2D>("muis");

            menuScroll = Content.Load<SoundEffect>("menuScroll");
            startsceneEffect = Content.Load<SoundEffect>("startScene");

            startScene = new StartScene(this, rgbFont, background, menuScroll, startsceneEffect);
            Components.Add(startScene);

            actionScene = new ActionScene(this, playerTexture, muisTexture);
            Components.Add(actionScene);

            startScene.Show();
            activeScene = startScene;
        }
Ejemplo n.º 2
0
 protected void ShowScene(GameScene scene)
 {
     activeScene.Hide();
     activeScene = scene;
     scene.Show();
 }