Пример #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);

            mainFont = Content.Load<SpriteFont>("mainfont");

            List<Room> rooms = new List<Room>();

            rooms.Add(Content.Load<Room>("Levels/Start"));
            rooms.Add(Content.Load<Room>("Levels/LD1"));
            rooms.Add(Content.Load<Room>("Levels/LR1"));
            rooms.Add(Content.Load<Room>("Levels/LU1"));
            rooms.Add(Content.Load<Room>("Levels/LUR1"));
            rooms.Add(Content.Load<Room>("Levels/RD1"));
            rooms.Add(Content.Load<Room>("Levels/UR1"));
            rooms.Add(Content.Load<Room>("Levels/UD1"));

            /* Added by ship gen
            rooms.Add(Content.Load<Room>("Levels/R1"));
            rooms.Add(Content.Load<Room>("Levels/L1"));
            rooms.Add(Content.Load<Room>("Levels/D1"));
            rooms.Add(Content.Load<Room>("Levels/U1"));
             * */

            deathSplash = Content.Load<Texture2D>(FileNames.deathSplash);
            pauseSplash = Content.Load<Texture2D>(FileNames.pauseSplash);

            Song track1 = Content.Load<Song>(FileNames.phase1);
            Song track2 = Content.Load<Song>(FileNames.phase2);
            Song track3 = Content.Load<Song>(FileNames.phase3);

            //death = Content.Load<SoundEffect>("Sounds/death");

            Song[] songs = new Song[] { track1, track2, track3 };

            MediaPlayer.Play(songs[1]);

            //Need to create the first ship here
            currentShip = new Ship(rooms);

            //OLD for debug below

            currentShip.Init(Content);
            // TODO: use this.Content to load your game content here
        }