Exemple #1
0
 public virtual void CheckCollisions(SpriteList against)
 {
 }
Exemple #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()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

              imageArray = new Texture2D[21];
              colorArray = new Color[21][];

              bombImageIndex.X = 0;
              bombImageIndex.Y = 5;
              imageArray[0] = Content.Load<Texture2D>("Weapon/weapon01");
              imageArray[1] = Content.Load<Texture2D>("Weapon/weapon02");
              imageArray[2] = Content.Load<Texture2D>("Weapon/weapon03");
              imageArray[3] = Content.Load<Texture2D>("Weapon/weapon02");
              imageArray[4] = Content.Load<Texture2D>("Weapon/weapon01");

              vineImageIndex.X = 5;
              vineImageIndex.Y = 4;
              imageArray[5] = Content.Load<Texture2D>("Vine/vinebase");
              imageArray[6] = Content.Load<Texture2D>("Vine/vinebase02");
              imageArray[7] = Content.Load<Texture2D>("Vine/vinebase03");
              imageArray[8] = Content.Load<Texture2D>("Vine/vinebase04");

              bubbleImageIndex.X = 10;
              bubbleImageIndex.Y = 5;
              imageArray[10] = Content.Load<Texture2D>("Bubble/bubble00");
              imageArray[11] = Content.Load<Texture2D>("Bubble/bubble01");
              imageArray[12] = Content.Load<Texture2D>("Bubble/bubble02");
              imageArray[13] = Content.Load<Texture2D>("Bubble/bubble03");
            imageArray[14] = Content.Load<Texture2D>("Bubble/Gas 001");

              wallImageIndex.X = 15;
              wallImageIndex.Y = 2;
              imageArray[15] = Content.Load<Texture2D>("walledge00");
              imageArray[16] = Content.Load<Texture2D>("walledge01");

              imageArray[20] = Content.Load<Texture2D>("Cursor/cursor02");

              colorArray[0] = new Color[imageArray[0].Width * imageArray[0].Height];
              colorArray[1] = new Color[imageArray[1].Width * imageArray[1].Height];
              colorArray[2] = new Color[imageArray[2].Width * imageArray[2].Height];
              colorArray[3] = new Color[imageArray[3].Width * imageArray[3].Height];
              colorArray[4] = new Color[imageArray[4].Width * imageArray[4].Height];

              colorArray[5] = new Color[imageArray[5].Width * imageArray[5].Height];
              colorArray[6] = new Color[imageArray[6].Width * imageArray[6].Height];
              colorArray[7] = new Color[imageArray[7].Width * imageArray[7].Height];
              colorArray[8] = new Color[imageArray[8].Width * imageArray[8].Height];

              colorArray[10] = new Color[imageArray[10].Width * imageArray[10].Height];
              colorArray[11] = new Color[imageArray[11].Width * imageArray[11].Height];
              colorArray[12] = new Color[imageArray[12].Width * imageArray[12].Height];
              colorArray[13] = new Color[imageArray[13].Width * imageArray[13].Height];

              colorArray[15] = new Color[imageArray[15].Width * imageArray[15].Height];
              colorArray[16] = new Color[imageArray[16].Width * imageArray[16].Height];

              imageArray[0].GetData(colorArray[0]);
              imageArray[1].GetData(colorArray[1]);
              imageArray[2].GetData(colorArray[2]);
              imageArray[3].GetData(colorArray[3]);
              imageArray[4].GetData(colorArray[4]);

              imageArray[5].GetData(colorArray[5]);
              imageArray[6].GetData(colorArray[6]);
              imageArray[7].GetData(colorArray[7]);
              imageArray[8].GetData(colorArray[8]);

              imageArray[10].GetData(colorArray[10]);

              imageArray[15].GetData(colorArray[15]);
              imageArray[16].GetData(colorArray[16]);

              vineMake = Content.Load<SoundEffect>("Vine/vineMake");
              vineDestroy = Content.Load<SoundEffect>("Vine/vineDestroyHigh");
              vineHit = Content.Load<SoundEffect>("Vine/vineHit02");
              coreHit = Content.Load<SoundEffect>("coreHitSudden");
              backgroundHum = Content.Load<SoundEffect>("lowThump").CreateInstance();
              backgroundHum.Volume = 0.3f; //reduces headaches

              sFont = Content.Load<SpriteFont>("SpriteFont1");

              for (int i = 0; i < wallCount; i++)
              {
            Sprite s = new Wall();
            leftWallList.Add(s);
              }
              objectList.Add(leftWallList);

              for (int i = 0; i < wallCount; i++)
              {
            Sprite s = new Wall();
            ((Wall)s).Flip();
            rightWallList.Add(s);
              }
              objectList.Add(rightWallList);

              for (int i = 0; i < vineCount; i++)
              {
                SpriteList sl = new SpriteList();//Vine();
            for (int j = 0; j < vineCount; j++)
            {
              Sprite s = new Vine();
              sl.Add(s);
            }
            vineList.Add(sl);
              }
              objectList.Add(vineList);

              for (int i = 0; i < bombCount; i++)
              {
            Sprite s = new Bomb();
            bombList.Add(s);
              }
              objectList.Add(bombList);

              for (int i = 0; i < bubbleCount; i++)
              {
            Sprite s = new Bubble();
            bubbleList.Add(s);
              }
              uI.Add(bubbleList); //think they should always move. they are cosmetic afterall

              cursor = new Cursor();
              uI.Add(cursor);

              objectList.Setup();
              uI.Setup();

              FindBorders();

              State = GAME_MENU;

              // Comment out this line for one game
              //   to clear the high score
              //GetHighScore();
        }