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

            //Associate names in the dictionary with the graphics
            for (int x = 0; x < Textures.graphicNames.Length; x++)
            {
                Textures.textures.Add(Textures.graphicNames[x], Content.Load <Texture2D>(Textures.graphicNames[x]));
            }

            KittenZombie    kt = new KittenZombie(400, 300, worldState);
            FlowerTentacles ft = new FlowerTentacles(600, 250, worldState);

            //creatures.Add(kt);
            for (int i = 0; i < 5; i++)
            {
                for (int y2 = 0; y2 < 5; y2++)
                {
                    kt = new KittenZombie(i * 35, 5 + (y2 * 35), worldState);
                    ft = new FlowerTentacles(5 + (i * 35), (y2 * 35) + 230, worldState);
                    creatures.Add(kt);
                    creatures.Add(ft);
                }
            }
            player = new Player(700, 300, worldState);
            creatures.Add(player);

            /*FlowerTentacles ft = new FlowerTentacles(600, 250, worldState);
             * creatures.Add(ft);
             *
             * ft = new FlowerTentacles(300, 350, worldState);
             * creatures.Add(ft);*/

            GreenBlock b = new GreenBlock(250, 300, worldState);

            items.Add(b);

            song  = Content.Load <Song>("whitesky");
            song2 = Content.Load <Song>("climbing_up_the_walls");
            MediaPlayer.Play(song);
            //MediaPlayer.IsRepeating = true;
        }
Esempio n. 2
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //Associate names in the dictionary with the graphics
            for (int x = 0; x < Textures.graphicNames.Length; x++)
            {
                Textures.textures.Add(Textures.graphicNames[x], Content.Load<Texture2D>(Textures.graphicNames[x]));
            }

            KittenZombie kt = new KittenZombie(400,300,worldState);
            FlowerTentacles ft = new FlowerTentacles(600, 250, worldState);
            //creatures.Add(kt);
            for (int i = 0; i < 5; i++ )
            {
                for (int y2 = 0; y2 < 5; y2++)
                {
                    kt = new KittenZombie(i * 35, 5 + (y2 * 35), worldState);
                    ft = new FlowerTentacles(5 + (i * 35),(y2 * 35) + 230, worldState);
                    creatures.Add(kt);
                    creatures.Add(ft);
                }
            }
            player = new Player(700, 300, worldState);
            creatures.Add(player);

            /*FlowerTentacles ft = new FlowerTentacles(600, 250, worldState);
            creatures.Add(ft);

            ft = new FlowerTentacles(300, 350, worldState);
            creatures.Add(ft);*/

            GreenBlock b = new GreenBlock(250, 300, worldState);
            items.Add(b);

            song = Content.Load<Song>("whitesky");
            song2 = Content.Load<Song>("climbing_up_the_walls");
            MediaPlayer.Play(song);
            //MediaPlayer.IsRepeating = true;
        }