Exemplo n.º 1
0
        protected override void LoadContent()
        {
            spriteBatch         = new SpriteBatch(GraphicsDevice);
            levelTextureHandler = new ContentManager(this.Services, "Content");
            font = Content.Load <SpriteFont>("font");

            #region Load angel
            angelNormalTexture[0] = Content.Load <Texture2D>("angel/angel normal 1");
            angelNormalTexture[1] = Content.Load <Texture2D>("angel/angel normal 2");
            angelFlyTexture[0]    = Content.Load <Texture2D>("angel/angel fly 1");
            angelFlyTexture[1]    = Content.Load <Texture2D>("angel/angel fly 2");
            angelFlyTexture[2]    = Content.Load <Texture2D>("angel/angel fly 3");
            #endregion
            #region Load cat
            catNormalTexture[0] = catNormalTexture[6] = Content.Load <Texture2D>("cat/cat normal 1");
            catNormalTexture[1] = catNormalTexture[5] = Content.Load <Texture2D>("cat/cat normal 2");
            catNormalTexture[2] = catNormalTexture[4] = Content.Load <Texture2D>("cat/cat normal 3");
            catNormalTexture[3] = Content.Load <Texture2D>("cat/cat normal 4");
            catHitTexture[0]    = catHitTexture[4] = Content.Load <Texture2D>("cat/cat hit 1");
            catHitTexture[1]    = catHitTexture[3] = Content.Load <Texture2D>("cat/cat hit 2");
            catHitTexture[2]    = Content.Load <Texture2D>("cat/cat hit 3");
            catHitTexture[5]    = catHitTexture[7] = Content.Load <Texture2D>("cat/cat hit 4");
            catHitTexture[6]    = Content.Load <Texture2D>("cat/cat hit 5");
            #endregion
            #region Load objects
            gemTexture       = Content.Load <Texture2D>("objects/gem");
            pixel            = Content.Load <Texture2D>("pixel");
            explosionTexture = Content.Load <Texture2D>("objects/explosion particle");

            Texture2D[] fenceTexture = new Texture2D[1];
            fenceTexture[0] = Content.Load <Texture2D>("pixel");
            obTextures.Add("fence", fenceTexture);
            Texture2D[] rockTexture = new Texture2D[1];
            rockTexture[0] = Content.Load <Texture2D>("objects/rock");
            obTextures.Add("rock", rockTexture);
            Texture2D[] buttonTexture = new Texture2D[1];
            buttonTexture[0] = Content.Load <Texture2D>("objects/button");
            obTextures.Add("button", buttonTexture);
            Texture2D[] timeFrontTexture = new Texture2D[1];
            timeFrontTexture[0] = Content.Load <Texture2D>("objects/timer front");
            obTextures.Add("timefront", timeFrontTexture);
            Texture2D[] timeBackTexture = new Texture2D[1];
            timeBackTexture[0] = Content.Load <Texture2D>("objects/timer back");
            obTextures.Add("timeback", timeBackTexture);
            Texture2D[] plasmaTexture = new Texture2D[3];
            plasmaTexture[0] = Content.Load <Texture2D>("objects/plasma ball 1");
            plasmaTexture[1] = Content.Load <Texture2D>("objects/plasma ball 2");
            plasmaTexture[2] = Content.Load <Texture2D>("objects/plasma ball 3");
            obTextures.Add("plasma", plasmaTexture);
            Texture2D[] rocketTexture = new Texture2D[1];
            rocketTexture[0] = Content.Load <Texture2D>("objects/rocket");
            obTextures.Add("rocket", rocketTexture);
            Texture2D[] launcherTexture = new Texture2D[1];
            launcherTexture[0] = Content.Load <Texture2D>("objects/launcher");
            obTextures.Add("launcher", launcherTexture);
            Texture2D[] trailTexture = new Texture2D[1];
            trailTexture[0] = explosionTexture;
            obTextures.Add("trail", trailTexture);
            Texture2D[] bubbleTexture = new Texture2D[1];
            bubbleTexture[0] = explosionTexture;
            obTextures.Add("bubble", bubbleTexture);
            Texture2D[] starTexture = new Texture2D[1];
            starTexture[0] = Content.Load <Texture2D>("objects/starfish");
            obTextures.Add("starfish", starTexture);
            Texture2D[] fishTexture = new Texture2D[2];
            fishTexture[0] = Content.Load <Texture2D>("objects/fish 1");
            fishTexture[1] = Content.Load <Texture2D>("objects/fish 2");
            obTextures.Add("fish", fishTexture);
            #endregion
            #region Load music
            canyonSong = Content.Load <Song>("canyonmus");
            caveSong   = Content.Load <Song>("cavemus");
            labSong    = Content.Load <Song>("labmus");
            warSong    = Content.Load <Song>("warmus");
            waterSong  = Content.Load <Song>("watermus");
            finalSong  = Content.Load <Song>("finalmus");
            #endregion
            #region Load sounds
            hitWall           = Content.Load <SoundEffect>("thump");
            flap              = Content.Load <SoundEffect>("whoosh");
            meow              = Content.Load <SoundEffect>("meow");
            explode           = Content.Load <SoundEffect>("explosion");
            die               = Content.Load <SoundEffect>("dead");
            getGem            = Content.Load <SoundEffect>("get gem");
            ticking           = Content.Load <SoundEffect>("ticking");
            loopTick          = ticking.CreateInstance();
            loopTick.IsLooped = true;
            loopTick.Volume   = 0.25f;
            rocketLaunch      = Content.Load <SoundEffect>("rocket launch");
            creditsMus        = Content.Load <SoundEffect>("credits");
            #endregion
            #region Load easter egg
            easterEgg            = Content.Load <Video>("easter egg");
            videoPlayer.IsLooped = true;
            videoPlayer.Volume   = 1.0f;
            #endregion

            #region Instantiate cats
            HUDCat = new Cat(Vector2.Zero, -1, null,
                             new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[0] = new Cat(Vector2.Zero, 0,
                              "Welcome to Cat Planet 2!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[1] = new Cat(Vector2.Zero, 1,
                              "Double the cat planet!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[2] = new Cat(Vector2.Zero, 2,
                              "I'm lost :(",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[3] = new Cat(Vector2.Zero, 3,
                              "Explore more Cat Planet!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[4] = new Cat(Vector2.Zero, 4,
                              "Cat Village was destroyed by the crows!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[5] = new Cat(Vector2.Zero, 5,
                              "So we moved here!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[6] = new Cat(Vector2.Zero, 6,
                              "Cat Planet Canyon Planet!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[7] = new Cat(Vector2.Zero, 7,
                              "Find all of the gems of light!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[8] = new Cat(Vector2.Zero, 8,
                              "Uncover the secrets of Cat Planet!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[9] = new Cat(Vector2.Zero, 9,
                              "You need to collect the gems to\n" +
                              "        prove yourself!",
                              new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[10] = new Cat(Vector2.Zero, 10,
                               "Our friend is gone!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[11] = new Cat(Vector2.Zero, 11,
                               "He went up and never came back!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[12] = new Cat(Vector2.Zero, 12,
                               "These caves are scary!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[13] = new Cat(Vector2.Zero, 13,
                               "I'm in a ditch.",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[14] = new Cat(Vector2.Zero, 14,
                               "The gem is close by!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[15] = new Cat(Vector2.Zero, 15,
                               "It's left from here.",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[16] = new Cat(Vector2.Zero, 16,
                               "It's down there!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[17] = new Cat(Vector2.Zero, 17,
                               "Did you get the gem?",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[18] = new Cat(Vector2.Zero, 18,
                               "I wasn't in the first game!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[19] = new Cat(Vector2.Zero, 19,
                               "The fish are evil!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[20] = new Cat(Vector2.Zero, 20,
                               "There's more danger past these spikes!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[21] = new Cat(Vector2.Zero, 21,
                               "There's a secret close by.",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[22] = new Cat(Vector2.Zero, 22,
                               "I don't know where these rocks\n" +
                               "      are coming from!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[23] = new Cat(Vector2.Zero, 23,
                               "The fish have made Cat Planet\n" +
                               "     a dangerous place!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[24] = new Cat(Vector2.Zero, 24,
                               "War is not the answer!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[25] = new Cat(Vector2.Zero, 25,
                               "Cat!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[26] = new Cat(Vector2.Zero, 26,
                               "Pla!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[27] = new Cat(Vector2.Zero, 27,
                               "Net!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[28] = new Cat(Vector2.Zero, 28,
                               "Help!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[29] = new Cat(Vector2.Zero, 29,
                               "Up there is a war zone!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[30] = new Cat(Vector2.Zero, 30,
                               "Spinning plasma of doom!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[31] = new Cat(Vector2.Zero, 31,
                               "Obviously work of the fish!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[32] = new Cat(Vector2.Zero, 32,
                               "The gem!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[33] = new Cat(Vector2.Zero, 33,
                               "Be careful here!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[34] = new Cat(Vector2.Zero, 34,
                               "The cat below me is lying!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[35] = new Cat(Vector2.Zero, 35,
                               "The bottom cat is\n" +
                               "telling the truth!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[36] = new Cat(Vector2.Zero, 36,
                               "I'm lying!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[37] = new Cat(Vector2.Zero, 37,
                               "The first cat is the same\n" +
                               "  as the one above me!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[38] = new Cat(Vector2.Zero, 38,
                               "Those rocket launchers are\n" +
                               "       dangerous!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[39] = new Cat(Vector2.Zero, 39,
                               "Explosions are cool!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[40] = new Cat(Vector2.Zero, 40,
                               "More rocks!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[41] = new Cat(Vector2.Zero, 41,
                               "   The crows are no more,\n" +
                               "but the fish are much worse.",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[42] = new Cat(Vector2.Zero, 42,
                               "So much destruction!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[43] = new Cat(Vector2.Zero, 43,
                               "We're losing!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[44] = new Cat(Vector2.Zero, 44,
                               "The gem here is well\n" +
                               "     protected!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[45] = new Cat(Vector2.Zero, 45,
                               "My friend is trapped!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[46] = new Cat(Vector2.Zero, 46,
                               "I'm actually safe from\n" +
                               " the rockets up here!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[47] = new Cat(Vector2.Zero, 47,
                               "Reminds me of 'Nam.",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[48] = new Cat(Vector2.Zero, 48,
                               "I think that's what we're\n" +
                               "    fighting over...",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[49] = new Cat(Vector2.Zero, 49,
                               "They're everywhere!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[50] = new Cat(Vector2.Zero, 50,
                               "Imperialist fish!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[51] = new Cat(Vector2.Zero, 51,
                               "We're underwater!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[52] = new Cat(Vector2.Zero, 52,
                               "Cat Planet Ocean!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[53] = new Cat(Vector2.Zero, 53,
                               "The bubbles carry\n" +
                               "   you places!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[54] = new Cat(Vector2.Zero, 54,
                               "Cats don't like water!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[55] = new Cat(Vector2.Zero, 55,
                               "BUBBLES!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[56] = new Cat(Vector2.Zero, 56,
                               "Time it right!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[57] = new Cat(Vector2.Zero, 57,
                               "Starfish are dangerous!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[58] = new Cat(Vector2.Zero, 58,
                               "But they're nothing \n" +
                               "  compared to the\n" +
                               "       fish!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[59] = new Cat(Vector2.Zero, 59,
                               "You're close to the\n" +
                               "  final struggle!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[60] = new Cat(Vector2.Zero, 60,
                               "You need all the gems\n" +
                               "of light to continue!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[61] = new Cat(Vector2.Zero, 61,
                               "  Do you have 62 cats?\n" +
                               "There's no turning back.",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[62] = new Cat(Vector2.Zero, 62,
                               "It's the fish!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[63] = new Cat(Vector2.Zero, 63,
                               "The fish are dangerous!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[64] = new Cat(Vector2.Zero, 64,
                               "Keep going!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[65] = new Cat(Vector2.Zero, 65,
                               "You're getting close!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[66] = new Cat(Vector2.Zero, 66,
                               "You have to go up!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[67] = new Cat(Vector2.Zero, 67,
                               "You did it!",
                               new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            #endregion
            #region Instantiate gems
            gems[0] = new Gem(Vector2.Zero, gemTexture, Color.Cyan);
            gems[1] = new Gem(Vector2.Zero, gemTexture, Color.Lime);
            gems[2] = new Gem(Vector2.Zero, gemTexture, Color.Red);
            gems[3] = new Gem(Vector2.Zero, gemTexture, Color.Yellow);
            gems[4] = new Gem(Vector2.Zero, gemTexture, Color.Violet);
            #endregion
            #region Instantiate final fences
            finalFences[0] = new ElectricFence(new Rectangle(319, 478, 349, 32), obTextures["fence"][0], Color.Cyan, 0);
            finalFences[1] = new ElectricFence(new Rectangle(319, 527, 349, 32), obTextures["fence"][0], Color.Lime, 1);
            finalFences[2] = new ElectricFence(new Rectangle(319, 576, 349, 32), obTextures["fence"][0], Color.Red, 2);
            finalFences[3] = new ElectricFence(new Rectangle(319, 625, 349, 32), obTextures["fence"][0], Color.Yellow, 3);
            finalFences[4] = new ElectricFence(new Rectangle(319, 674, 349, 32), obTextures["fence"][0], Color.Violet, 4);
            #endregion

            StreamReader sr = new StreamReader("Content/levels/11-0.txt");
            levels[11, 0] = new Level(sr, new Vector2(11, 0), Level.Type.Canyons, Content.Load <Texture2D>("backdrops/canyons"), levelTextureHandler.Load <Texture2D>("foregrounds/11-0"), cats, gems, obTextures);
            sr.Close();
            sr            = new StreamReader("Content/levels/10-0.txt");
            levels[10, 0] = new Level(sr, new Vector2(10, 0), Level.Type.Canyons, Content.Load <Texture2D>("backdrops/canyons"), levelTextureHandler.Load <Texture2D>("foregrounds/10-0"), cats, gems, obTextures);
            sr.Close();
            sr           = new StreamReader("Content/levels/0-0.txt");
            levels[0, 0] = new Level(sr, new Vector2(0, 0), Level.Type.Final, Content.Load <Texture2D>("backdrops/final"), levelTextureHandler.Load <Texture2D>("pixel"), cats, gems, obTextures);
            sr.Close();
            sr.Dispose();

            currentLevel  = levels[11, 0];
            previousLevel = levels[10, 0];
            LoadLevels();

            angel = new Angel(angelNormalTexture, angelFlyTexture, hitWall, flap, new Vector2(windowWidth / 2, 459));
            MediaPlayer.Volume      = 0.85f;
            MediaPlayer.IsRepeating = true;
            ChangeSong();
        }
Exemplo n.º 2
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            levelTextureHandler = new ContentManager(this.Services, "Content");
            font = Content.Load<SpriteFont>("font");

            #region Load angel
            angelNormalTexture[0] = Content.Load<Texture2D>("angel/angel normal 1");
            angelNormalTexture[1] = Content.Load<Texture2D>("angel/angel normal 2");
            angelFlyTexture[0] = Content.Load<Texture2D>("angel/angel fly 1");
            angelFlyTexture[1] = Content.Load<Texture2D>("angel/angel fly 2");
            angelFlyTexture[2] = Content.Load<Texture2D>("angel/angel fly 3");
            #endregion
            #region Load cat
            catNormalTexture[0] = catNormalTexture[6] = Content.Load<Texture2D>("cat/cat normal 1");
            catNormalTexture[1] = catNormalTexture[5] = Content.Load<Texture2D>("cat/cat normal 2");
            catNormalTexture[2] = catNormalTexture[4] = Content.Load<Texture2D>("cat/cat normal 3");
            catNormalTexture[3] = Content.Load<Texture2D>("cat/cat normal 4");
            catHitTexture[0] = catHitTexture[4] = Content.Load<Texture2D>("cat/cat hit 1");
            catHitTexture[1] = catHitTexture[3] = Content.Load<Texture2D>("cat/cat hit 2");
            catHitTexture[2] = Content.Load<Texture2D>("cat/cat hit 3");
            catHitTexture[5] = catHitTexture[7] = Content.Load<Texture2D>("cat/cat hit 4");
            catHitTexture[6] = Content.Load<Texture2D>("cat/cat hit 5");
            #endregion
            #region Load objects
            gemTexture = Content.Load<Texture2D>("objects/gem");
            pixel = Content.Load<Texture2D>("pixel");
            explosionTexture = Content.Load<Texture2D>("objects/explosion particle");

            Texture2D[] fenceTexture = new Texture2D[1];
            fenceTexture[0] = Content.Load<Texture2D>("pixel");
            obTextures.Add("fence", fenceTexture);
            Texture2D[] rockTexture = new Texture2D[1];
            rockTexture[0] = Content.Load<Texture2D>("objects/rock");
            obTextures.Add("rock", rockTexture);
            Texture2D[] buttonTexture = new Texture2D[1];
            buttonTexture[0] = Content.Load<Texture2D>("objects/button");
            obTextures.Add("button", buttonTexture);
            Texture2D[] timeFrontTexture = new Texture2D[1];
            timeFrontTexture[0] = Content.Load<Texture2D>("objects/timer front");
            obTextures.Add("timefront", timeFrontTexture);
            Texture2D[] timeBackTexture = new Texture2D[1];
            timeBackTexture[0] = Content.Load<Texture2D>("objects/timer back");
            obTextures.Add("timeback", timeBackTexture);
            Texture2D[] plasmaTexture = new Texture2D[3];
            plasmaTexture[0] = Content.Load<Texture2D>("objects/plasma ball 1");
            plasmaTexture[1] = Content.Load<Texture2D>("objects/plasma ball 2");
            plasmaTexture[2] = Content.Load<Texture2D>("objects/plasma ball 3");
            obTextures.Add("plasma", plasmaTexture);
            Texture2D[] rocketTexture = new Texture2D[1];
            rocketTexture[0] = Content.Load<Texture2D>("objects/rocket");
            obTextures.Add("rocket", rocketTexture);
            Texture2D[] launcherTexture = new Texture2D[1];
            launcherTexture[0] = Content.Load<Texture2D>("objects/launcher");
            obTextures.Add("launcher", launcherTexture);
            Texture2D[] trailTexture = new Texture2D[1];
            trailTexture[0] = explosionTexture;
            obTextures.Add("trail", trailTexture);
            Texture2D[] bubbleTexture = new Texture2D[1];
            bubbleTexture[0] = explosionTexture;
            obTextures.Add("bubble", bubbleTexture);
            Texture2D[] starTexture = new Texture2D[1];
            starTexture[0] = Content.Load<Texture2D>("objects/starfish");
            obTextures.Add("starfish", starTexture);
            Texture2D[] fishTexture = new Texture2D[2];
            fishTexture[0] = Content.Load<Texture2D>("objects/fish 1");
            fishTexture[1] = Content.Load<Texture2D>("objects/fish 2");
            obTextures.Add("fish", fishTexture);
            #endregion
            #region Load music
            canyonSong = Content.Load<Song>("canyonmus");
            caveSong = Content.Load<Song>("cavemus");
            labSong = Content.Load<Song>("labmus");
            warSong = Content.Load<Song>("warmus");
            waterSong = Content.Load<Song>("watermus");
            finalSong = Content.Load<Song>("finalmus");
            #endregion
            #region Load sounds
            hitWall = Content.Load<SoundEffect>("thump");
            flap = Content.Load<SoundEffect>("whoosh");
            meow = Content.Load<SoundEffect>("meow");
            explode = Content.Load<SoundEffect>("explosion");
            die = Content.Load<SoundEffect>("dead");
            getGem = Content.Load<SoundEffect>("get gem");
            ticking = Content.Load<SoundEffect>("ticking");
            loopTick = ticking.CreateInstance();
            loopTick.IsLooped = true;
            loopTick.Volume = 0.25f;
            rocketLaunch = Content.Load<SoundEffect>("rocket launch");
            creditsMus = Content.Load<SoundEffect>("credits");
            #endregion
            #region Load easter egg
            easterEgg = Content.Load<Video>("easter egg");
            videoPlayer.IsLooped = true;
            videoPlayer.Volume = 1.0f;
            #endregion

            #region Instantiate cats
            HUDCat = new Cat(Vector2.Zero, -1, null,
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[0] = new Cat(Vector2.Zero, 0,
                "Welcome to Cat Planet 2!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[1] = new Cat(Vector2.Zero, 1,
                "Double the cat planet!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[2] = new Cat(Vector2.Zero, 2,
                "I'm lost :(",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[3] = new Cat(Vector2.Zero, 3,
                "Explore more Cat Planet!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[4] = new Cat(Vector2.Zero, 4,
                "Cat Village was destroyed by the crows!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[5] = new Cat(Vector2.Zero, 5,
                "So we moved here!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[6] = new Cat(Vector2.Zero, 6,
                "Cat Planet Canyon Planet!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[7] = new Cat(Vector2.Zero, 7,
                "Find all of the gems of light!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[8] = new Cat(Vector2.Zero, 8,
                "Uncover the secrets of Cat Planet!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[9] = new Cat(Vector2.Zero, 9,
                "You need to collect the gems to\n" +
                "        prove yourself!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[10] = new Cat(Vector2.Zero, 10,
                "Our friend is gone!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[11] = new Cat(Vector2.Zero, 11,
                "He went up and never came back!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[12] = new Cat(Vector2.Zero, 12,
                "These caves are scary!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[13] = new Cat(Vector2.Zero, 13,
                "I'm in a ditch.",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[14] = new Cat(Vector2.Zero, 14,
                "The gem is close by!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[15] = new Cat(Vector2.Zero, 15,
                "It's left from here.",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[16] = new Cat(Vector2.Zero, 16,
                "It's down there!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[17] = new Cat(Vector2.Zero, 17,
                "Did you get the gem?",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[18] = new Cat(Vector2.Zero, 18,
                "I wasn't in the first game!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[19] = new Cat(Vector2.Zero, 19,
                "The fish are evil!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[20] = new Cat(Vector2.Zero, 20,
                "There's more danger past these spikes!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[21] = new Cat(Vector2.Zero, 21,
                "There's a secret close by.",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[22] = new Cat(Vector2.Zero, 22,
                "I don't know where these rocks\n" +
                "      are coming from!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[23] = new Cat(Vector2.Zero, 23,
                "The fish have made Cat Planet\n" +
                "     a dangerous place!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[24] = new Cat(Vector2.Zero, 24,
                "War is not the answer!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[25] = new Cat(Vector2.Zero, 25,
                "Cat!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[26] = new Cat(Vector2.Zero, 26,
                "Pla!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[27] = new Cat(Vector2.Zero, 27,
                "Net!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[28] = new Cat(Vector2.Zero, 28,
                "Help!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[29] = new Cat(Vector2.Zero, 29,
                "Up there is a war zone!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[30] = new Cat(Vector2.Zero, 30,
                "Spinning plasma of doom!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[31] = new Cat(Vector2.Zero, 31,
                "Obviously work of the fish!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[32] = new Cat(Vector2.Zero, 32,
                "The gem!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[33] = new Cat(Vector2.Zero, 33,
                "Be careful here!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[34] = new Cat(Vector2.Zero, 34,
                "The cat below me is lying!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[35] = new Cat(Vector2.Zero, 35,
                "The bottom cat is\n" +
                "telling the truth!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[36] = new Cat(Vector2.Zero, 36,
                "I'm lying!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[37] = new Cat(Vector2.Zero, 37,
                "The first cat is the same\n" +
                "  as the one above me!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[38] = new Cat(Vector2.Zero, 38,
                "Those rocket launchers are\n" +
                "       dangerous!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[39] = new Cat(Vector2.Zero, 39,
                "Explosions are cool!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[40] = new Cat(Vector2.Zero, 40,
                "More rocks!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[41] = new Cat(Vector2.Zero, 41,
                "   The crows are no more,\n" +
                "but the fish are much worse.",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[42] = new Cat(Vector2.Zero, 42,
                "So much destruction!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[43] = new Cat(Vector2.Zero, 43,
                "We're losing!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[44] = new Cat(Vector2.Zero, 44,
                "The gem here is well\n" +
                "     protected!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[45] = new Cat(Vector2.Zero, 45,
                "My friend is trapped!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[46] = new Cat(Vector2.Zero, 46,
                "I'm actually safe from\n" +
                " the rockets up here!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[47] = new Cat(Vector2.Zero, 47,
                "Reminds me of 'Nam.",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[48] = new Cat(Vector2.Zero, 48,
                "I think that's what we're\n" +
                "    fighting over...",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[49] = new Cat(Vector2.Zero, 49,
                "They're everywhere!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[50] = new Cat(Vector2.Zero, 50,
                "Imperialist fish!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[51] = new Cat(Vector2.Zero, 51,
                "We're underwater!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[52] = new Cat(Vector2.Zero, 52,
                "Cat Planet Ocean!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[53] = new Cat(Vector2.Zero, 53,
                "The bubbles carry\n" +
                "   you places!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[54] = new Cat(Vector2.Zero, 54,
                "Cats don't like water!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[55] = new Cat(Vector2.Zero, 55,
                "BUBBLES!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[56] = new Cat(Vector2.Zero, 56,
                "Time it right!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[57] = new Cat(Vector2.Zero, 57,
                "Starfish are dangerous!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[58] = new Cat(Vector2.Zero, 58,
                "But they're nothing \n" +
                "  compared to the\n" +
                "       fish!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[59] = new Cat(Vector2.Zero, 59,
                "You're close to the\n" +
                "  final struggle!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[60] = new Cat(Vector2.Zero, 60,
                "You need all the gems\n" +
                "of light to continue!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[61] = new Cat(Vector2.Zero, 61,
                "  Do you have 62 cats?\n" +
                "There's no turning back.",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[62] = new Cat(Vector2.Zero, 62,
                "It's the fish!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[63] = new Cat(Vector2.Zero, 63,
                "The fish are dangerous!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[64] = new Cat(Vector2.Zero, 64,
                "Keep going!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[65] = new Cat(Vector2.Zero, 65,
                "You're getting close!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[66] = new Cat(Vector2.Zero, 66,
                "You have to go up!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            cats[67] = new Cat(Vector2.Zero, 67,
                "You did it!",
                new AnimatedTexture(catNormalTexture, 4, false), new AnimatedTexture(catHitTexture, 4, false), font);
            #endregion
            #region Instantiate gems
            gems[0] = new Gem(Vector2.Zero, gemTexture, Color.Cyan);
            gems[1] = new Gem(Vector2.Zero, gemTexture, Color.Lime);
            gems[2] = new Gem(Vector2.Zero, gemTexture, Color.Red);
            gems[3] = new Gem(Vector2.Zero, gemTexture, Color.Yellow);
            gems[4] = new Gem(Vector2.Zero, gemTexture, Color.Violet);
            #endregion
            #region Instantiate final fences
            finalFences[0] = new ElectricFence(new Rectangle(319, 478, 349, 32), obTextures["fence"][0], Color.Cyan, 0);
            finalFences[1] = new ElectricFence(new Rectangle(319, 527, 349, 32), obTextures["fence"][0], Color.Lime, 1);
            finalFences[2] = new ElectricFence(new Rectangle(319, 576, 349, 32), obTextures["fence"][0], Color.Red, 2);
            finalFences[3] = new ElectricFence(new Rectangle(319, 625, 349, 32), obTextures["fence"][0], Color.Yellow, 3);
            finalFences[4] = new ElectricFence(new Rectangle(319, 674, 349, 32), obTextures["fence"][0], Color.Violet, 4);
            #endregion

            StreamReader sr = new StreamReader("Content/levels/11-0.txt");
            levels[11, 0] = new Level(sr, new Vector2(11, 0), Level.Type.Canyons, Content.Load<Texture2D>("backdrops/canyons"), levelTextureHandler.Load<Texture2D>("foregrounds/11-0"), cats, gems, obTextures);
            sr.Close();
            sr = new StreamReader("Content/levels/10-0.txt");
            levels[10, 0] = new Level(sr, new Vector2(10, 0), Level.Type.Canyons, Content.Load<Texture2D>("backdrops/canyons"), levelTextureHandler.Load<Texture2D>("foregrounds/10-0"), cats, gems, obTextures);
            sr.Close();
            sr = new StreamReader("Content/levels/0-0.txt");
            levels[0, 0] = new Level(sr, new Vector2(0, 0), Level.Type.Final, Content.Load<Texture2D>("backdrops/final"), levelTextureHandler.Load<Texture2D>("pixel"), cats, gems, obTextures);
            sr.Close();
            sr.Dispose();

            currentLevel = levels[11, 0];
            previousLevel = levels[10, 0];
            LoadLevels();

            angel = new Angel(angelNormalTexture, angelFlyTexture, hitWall, flap, new Vector2(windowWidth / 2, 459));
            MediaPlayer.Volume = 0.85f;
            MediaPlayer.IsRepeating = true;
            ChangeSong();
        }