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

			tex_blank = Content.Load<Texture2D>("blank");
			tex_helpArrow = Content.Load<Texture2D>("help arrow");

			tex_wall = Content.Load<Texture2D>("wall");
			tex_selected = Content.Load<Texture2D>("selected");
			tex_spawner = Content.Load<Texture2D>("spawner");
			tex_finish = Content.Load<Texture2D>("finish");
			tex_changer = Content.Load<Texture2D>("changer 2");
			tex_arrow = Content.Load<Texture2D>("arrow");

			tex_bots[0] = Content.Load<Texture2D>("bots/black bot");
			tex_bots[1] = Content.Load<Texture2D>("bots/blue bot");
			tex_bots[2] = Content.Load<Texture2D>("bots/yellow bot");
			tex_bots[3] = Content.Load<Texture2D>("bots/green bot");
			tex_bots[4] = Content.Load<Texture2D>("bots/red bot");
			tex_bots[5] = Content.Load<Texture2D>("bots/purple bot");
			tex_bots[6] = Content.Load<Texture2D>("bots/orange bot");
			tex_bots[7] = Content.Load<Texture2D>("bots/white bot");

			tex_doors[0] = Content.Load<Texture2D>("doors/black door");
			tex_doors[1] = Content.Load<Texture2D>("doors/blue door");
			tex_doors[2] = Content.Load<Texture2D>("doors/yellow door");
			tex_doors[3] = Content.Load<Texture2D>("doors/green door");
			tex_doors[4] = Content.Load<Texture2D>("doors/red door");
			tex_doors[5] = Content.Load<Texture2D>("doors/purple door");
			tex_doors[6] = Content.Load<Texture2D>("doors/orange door");
			tex_doors[7] = Content.Load<Texture2D>("doors/white door");

			for (int i = 0; i < tex_winBots.Length; i++)
				tex_winBots[i] = Content.Load<Texture2D>("win bot/white bot animation" + (i < 10 ? "0" : "") + i.ToString());
			anim_winBot = new AnimatedTexture(tex_winBots, 2, false, true);

			tex_bg = Content.Load<Texture2D>("bg");
			music = Content.Load<Song>("hue bots music");

			fnt_font = Content.Load<SpriteFont>("font");

			MediaPlayer.IsRepeating = true;
			MediaPlayer.Play(music);

			currentLevel = "level 0";
			LoadLevel(currentLevel);

			//// Testing ////
			// for (int i = 0; i < 1088; i += 64
			// {
			// 	actors.Add(new Wall(i, 0, 0));
			// 	actors.Add(new Wall(i, graphics.PreferredBackBufferHeight - 64, 0));
			// }
			// for (int i = 0; i < 896; i += 64)
			// {
			// 	actors.Add(new Wall(0, i, 0));
			// 	actors.Add(new Wall(graphics.PreferredBackBufferWidth - 384, i, 0));
			// }
			// actors.Add(new Door(320, 64, 4));
			// actors.Add(new Spawner(640, 640));
			////////
		}
예제 #2
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            tex_blank     = Content.Load <Texture2D>("blank");
            tex_helpArrow = Content.Load <Texture2D>("help arrow");

            tex_wall     = Content.Load <Texture2D>("wall");
            tex_selected = Content.Load <Texture2D>("selected");
            tex_spawner  = Content.Load <Texture2D>("spawner");
            tex_finish   = Content.Load <Texture2D>("finish");
            tex_changer  = Content.Load <Texture2D>("changer 2");
            tex_arrow    = Content.Load <Texture2D>("arrow");

            tex_bots[0] = Content.Load <Texture2D>("bots/black bot");
            tex_bots[1] = Content.Load <Texture2D>("bots/blue bot");
            tex_bots[2] = Content.Load <Texture2D>("bots/yellow bot");
            tex_bots[3] = Content.Load <Texture2D>("bots/green bot");
            tex_bots[4] = Content.Load <Texture2D>("bots/red bot");
            tex_bots[5] = Content.Load <Texture2D>("bots/purple bot");
            tex_bots[6] = Content.Load <Texture2D>("bots/orange bot");
            tex_bots[7] = Content.Load <Texture2D>("bots/white bot");

            tex_doors[0] = Content.Load <Texture2D>("doors/black door");
            tex_doors[1] = Content.Load <Texture2D>("doors/blue door");
            tex_doors[2] = Content.Load <Texture2D>("doors/yellow door");
            tex_doors[3] = Content.Load <Texture2D>("doors/green door");
            tex_doors[4] = Content.Load <Texture2D>("doors/red door");
            tex_doors[5] = Content.Load <Texture2D>("doors/purple door");
            tex_doors[6] = Content.Load <Texture2D>("doors/orange door");
            tex_doors[7] = Content.Load <Texture2D>("doors/white door");

            for (int i = 0; i < tex_winBots.Length; i++)
            {
                tex_winBots[i] = Content.Load <Texture2D>("win bot/white bot animation" + (i < 10 ? "0" : "") + i.ToString());
            }
            anim_winBot = new AnimatedTexture(tex_winBots, 2, false, true);

            tex_bg = Content.Load <Texture2D>("bg");
            music  = Content.Load <Song>("hue bots music");

            fnt_font = Content.Load <SpriteFont>("font");

            MediaPlayer.IsRepeating = true;
            MediaPlayer.Play(music);

            currentLevel = "level 0";
            LoadLevel(currentLevel);

            //// Testing ////
            // for (int i = 0; i < 1088; i += 64
            // {
            //  actors.Add(new Wall(i, 0, 0));
            //  actors.Add(new Wall(i, graphics.PreferredBackBufferHeight - 64, 0));
            // }
            // for (int i = 0; i < 896; i += 64)
            // {
            //  actors.Add(new Wall(0, i, 0));
            //  actors.Add(new Wall(graphics.PreferredBackBufferWidth - 384, i, 0));
            // }
            // actors.Add(new Door(320, 64, 4));
            // actors.Add(new Spawner(640, 640));
            ////////
        }