Ejemplo n.º 1
0
 public void UpdateScreen(Screen screen)
 {
     this.currentScreen = screen;
 }
Ejemplo n.º 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()
        {
            // Load Worldfile XML
            XmlSerializer xS = new XmlSerializer(typeof(Worldfile));
            FileStream fS = new FileStream("worldfile.xml", FileMode.Open);
            Worldfile wF;
            wF = (Worldfile)xS.Deserialize(fS);
            Master.currentFile = wF;

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Draw textures
            texCollection.blank = new Texture2D(GraphicsDevice, 1, 1);
            texCollection.blank.SetData(new Color[] { Color.White });

            // Load in-game content
            texCollection.title = Content.Load<Texture2D>("title");
            texCollection.arcadeFont = Content.Load<Texture2D>("arcadefont");
            texCollection.controls = Content.Load<Texture2D>("menu");
            texCollection.credits = Content.Load<Texture2D>("credits");
            texCollection.controller = Content.Load<Texture2D>("controller");
            texCollection.worldTiles = Content.Load<Texture2D>("protoworld");
            texCollection.texMapPlayer = Content.Load<Texture2D>("mapplayer");
            texCollection.specialTiles = Content.Load<Texture2D>("specialstage");
            texCollection.texSpecial = Content.Load<Texture2D>("special");
            texCollection.texAdvPlayer = Content.Load<Texture2D>("advplayer");
            texCollection.texShadows = Content.Load<Texture2D>("shadows");
            texCollection.texEnemies = Content.Load<Texture2D>("enemies");
            texCollection.texCharacters = Content.Load<Texture2D>("characters");
            texCollection.texProjectile = Content.Load<Texture2D>("projectile");
            texCollection.texBosses = Content.Load<Texture2D>("bosses");
            texCollection.texFinal = Content.Load<Texture2D>("darkmarion");
            texCollection.texPlosion = Content.Load<Texture2D>("explosion");

            texCollection.adventureTiles = new Texture2D[8];
            texCollection.adventureTiles[0] = Content.Load<Texture2D>("dungeon1");
            texCollection.adventureTiles[1] = Content.Load<Texture2D>("town");
            texCollection.adventureTiles[2] = Content.Load<Texture2D>("dungeon2");
            texCollection.adventureTiles[3] = Content.Load<Texture2D>("dungeon3");
            texCollection.adventureTiles[4] = Content.Load<Texture2D>("dungeon4");
            texCollection.adventureTiles[5] = Content.Load<Texture2D>("dungeon5");
            texCollection.adventureTiles[6] = Content.Load<Texture2D>("dungeon6");
            texCollection.adventureTiles[7] = Content.Load<Texture2D>("town2");

            // Load sound effects (made in sfxr) and songs
            PlaySound.Initialize(Content);
            PlaySong.Initialize(Content);

            // Load title screen
            currentScreen = new TitleScreen(this);
        }
Ejemplo n.º 3
0
 public void LoadGameFromSaved(SavedGame sG)
 {
     currentGame = new Game(this);
     currentScreen = currentGame.BeginFromSaved(sG);
 }