public override void loadLevelObjects() { Gate myGate = new Gate(32 * 2, 32 * 6); Game1.miscObjects.Add(myGate); Button myButton = new ButtonPlayer(32 * 14, 32 * 13, myGate); Game1.miscObjects.Add(myButton); FlowerTentacles ft = new FlowerTentacles(7 * 32, 4 * 32); ft.setDefendTileGood(7, 4); ft.setDefendTileBad(7, 12); Game1.creatures.Add(ft); ft = new FlowerTentacles(14 * 32, 4 * 32); ft.setDefendTileGood(14, 4); ft.setDefendTileBad(14, 12); Game1.creatures.Add(ft); Strawberry sb = new Strawberry(9 * 32, 7 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(10 * 32, 7 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(11 * 32, 7 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(12 * 32, 7 * 32); Game1.miscObjects.Add(sb); Game1.miscObjects.Add(new Strawberry(8 * 32, 7 * 32)); Game1.miscObjects.Add(new Strawberry(13 * 32, 7 * 32)); //level tiles levelTiles.Add(new LevelTile(2 * 32, 4 * 32, "blackBlock", "blackBlock", "laserIntroLevel", new Point(25 * 32, 25 * 32))); levelTiles.Add(new LevelTile(20 * 32, 12 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(19 * 32, 7 * 32))); }
public override void loadLevelObjects() { FlowerTentacles ft = new FlowerTentacles(32 * 11, 32 * 4); VineMoveBlock vm = new VineMoveBlock(32 * 7, 32 * 25); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 13, 32 * 19); Game1.miscObjects.Add(vm); Game1.miscObjects.Add(new LaserBlock(32 * 10, 32 * 10)); Game1.miscObjects.Add(new LaserBlock(32 * 11, 32 * 10, false)); Game1.miscObjects.Add(new LaserBlock(32 * 12, 32 * 10, true)); Game1.miscObjects.Add(new LaserBlock(32 * 13, 32 * 10, false)); Game1.miscObjects.Add(new LaserBlock(32 * 14, 32 * 10, true)); for (int i = 0; i < 20; i++) { if (i % 4 == 0) { Game1.miscObjects.Add(new LaserBlock(32 * (20 + i), 32 * (1 + i), true)); Game1.miscObjects.Add(new VineMoveBlock(32 * (18 + i), 32 * (1 + i))); } else if ((i + 3) % 4 == 0) { Game1.miscObjects.Add(new LaserBlock(32 * (20 + i), 32 * (1 + i), false)); } } Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 10)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 15)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 10)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 5)); levelTiles.Add(new LevelTile(9 * 32, 5 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(19 * 32, 7 * 32))); }
public override void loadLevelObjects() { Gate myGate = new Gate(12 * 32, 9 * 32); Game1.miscObjects.Add(myGate); Button myButton = new ButtonPlayer(12 * 32, 12 * 32, myGate); Game1.miscObjects.Add(myButton); Strawberry sb = new Strawberry(15 * 32, 8 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(3 * 32, 9 * 32); Game1.miscObjects.Add(sb); VineMoveBlock vb = new VineMoveBlock(7 * 32, 4 * 32); Game1.miscObjects.Add(vb); vb = new VineMoveBlock(7 * 32, 9 * 32); Game1.miscObjects.Add(vb); vb = new VineMoveBlock(15 * 32, 9 * 32); Game1.miscObjects.Add(vb); vb = new VineMoveBlock(14 * 32, 8 * 32); Game1.miscObjects.Add(vb); vb = new VineMoveBlock(18 * 32, 2 * 32); Game1.miscObjects.Add(vb); //mook FlowerTentacles ft = new FlowerTentacles(9 * 32, 4 * 32); ft.setDefendTileGood(9, 4); ft.setDefendTileBad(16, 4); Game1.creatures.Add(ft); //level tiles levelTiles.Add(new LevelTile(23 * 32, 12 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(26 * 32, 6 * 32))); //levelTiles.Add(new LevelTile(23 * 32, 12 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(19 * 32, 7 * 32))); }
public override void loadLevelObjects() { FlowerTentacles ft = new FlowerTentacles(32 * 11, 32 * 4); VineMoveBlock vm = new VineMoveBlock(32 * 7, 32 * 25); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 13, 32 * 19); Game1.miscObjects.Add(vm); Game1.miscObjects.Add(new LaserBlock(32 * 10, 32 * 10)); Game1.miscObjects.Add(new LaserBlock(32 * 11, 32 * 10,false)); Game1.miscObjects.Add(new LaserBlock(32 * 12, 32 * 10,true)); Game1.miscObjects.Add(new LaserBlock(32 * 13, 32 * 10,false)); Game1.miscObjects.Add(new LaserBlock(32 * 14, 32 * 10,true)); for (int i = 0; i < 20; i++ ) { if (i % 4 == 0) { Game1.miscObjects.Add(new LaserBlock(32 * (20 + i), 32 * (1 + i), true)); Game1.miscObjects.Add(new VineMoveBlock(32 * (18 + i), 32 * (1 + i))); } else if ((i + 3) % 4 == 0) { Game1.miscObjects.Add(new LaserBlock(32 * (20 + i), 32 * (1 + i), false)); } } Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 10)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 15)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 10)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 5)); levelTiles.Add(new LevelTile(9 * 32, 5 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(19 * 32, 7 * 32))); }
public override void loadLevelObjects() { FlowerTentacles ft = new FlowerTentacles(32 * 11, 32 * 4); VineMoveBlock vm = new VineMoveBlock(32 * 7, 32 * 25); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 13, 32 * 19); Game1.miscObjects.Add(vm); Game1.miscObjects.Add(new LaserBlock(3 * 32, 6 * 32, false)); Game1.miscObjects.Add(new LaserBlock(2 * 32, 7 * 32, true)); Game1.miscObjects.Add(new LaserBlock(2 * 32, 9 * 32, false)); Game1.miscObjects.Add(new LaserBlock(22 * 32, 6 * 32, false)); Game1.miscObjects.Add(new LaserBlock(22 * 32, 9 * 32, true)); Game1.miscObjects.Add(new LaserBlock(14 * 32, 3 * 32, false)); Game1.miscObjects.Add(new LaserBlock(11 * 32, 1 * 32, true)); Game1.miscObjects.Add(new LaserBlock(13 * 32, 1 * 32, true)); Gate gate = new Gate(23 * 32, 13 * 32); Game1.miscObjects.Add(gate); Button button = new ButtonPlayer(9 * 32, 5 * 32, gate); Game1.miscObjects.Add(button); //Game1.miscObjects.Add(new LaserBlock(32 * 12, 32 * 10,true)); //Game1.miscObjects.Add(new LaserBlock(32 * 13, 32 * 10,false)); //Game1.miscObjects.Add(new LaserBlock(32 * 14, 32 * 10,true)); //next level levelTiles.Add(new LevelTile(24 * 32, 13 * 32, "blackBlock", "blackBlock", "marshFinalLevel", new Point(8 * 32, 46 * 32))); //previous //levelTiles.Add(new LevelTile(10 * 32, 14 * 32, "blackBlock", "blackBlock", "marsh1Level", new Point(26 * 32, 23 * 32))); }
public override void loadLevelObjects() { FlowerTentacles ft = new FlowerTentacles(32 * 11, 32 * 4); VineMoveBlock vm = new VineMoveBlock(32 * 7, 32 * 25); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 13, 32 * 19); Game1.miscObjects.Add(vm); Game1.miscObjects.Add(new LaserBlock(3 * 32, 6 * 32,false)); Game1.miscObjects.Add(new LaserBlock(2 * 32, 7 * 32,true)); Game1.miscObjects.Add(new LaserBlock(2 * 32, 9 * 32,false)); Game1.miscObjects.Add(new LaserBlock(22 * 32, 6 * 32,false)); Game1.miscObjects.Add(new LaserBlock(22 * 32, 9 * 32,true)); Game1.miscObjects.Add(new LaserBlock(14 * 32, 3 * 32, false)); Game1.miscObjects.Add(new LaserBlock(11 * 32, 1 * 32, true)); Game1.miscObjects.Add(new LaserBlock(13 * 32, 1 * 32, true)); Gate gate = new Gate(23 * 32, 13 * 32); Game1.miscObjects.Add(gate); Button button = new ButtonPlayer(9 * 32, 5 * 32, gate); Game1.miscObjects.Add(button); //Game1.miscObjects.Add(new LaserBlock(32 * 12, 32 * 10,true)); //Game1.miscObjects.Add(new LaserBlock(32 * 13, 32 * 10,false)); //Game1.miscObjects.Add(new LaserBlock(32 * 14, 32 * 10,true)); //next level levelTiles.Add(new LevelTile(24 * 32, 13 * 32, "blackBlock", "blackBlock", "marshFinalLevel", new Point(8 * 32, 46 * 32))); //previous //levelTiles.Add(new LevelTile(10 * 32, 14 * 32, "blackBlock", "blackBlock", "marsh1Level", new Point(26 * 32, 23 * 32))); }
public override void loadLevelObjects() { Gate myGate = new Gate(32 * 2, 32 * 6); Game1.miscObjects.Add(myGate); Button myButton = new ButtonPlayer(32 * 14, 32 * 13, myGate); Game1.miscObjects.Add(myButton); FlowerTentacles ft = new FlowerTentacles(7 * 32, 4 * 32); ft.setDefendTileGood(7, 4); ft.setDefendTileBad(7, 12); Game1.creatures.Add(ft); ft = new FlowerTentacles(14 * 32, 4 * 32); ft.setDefendTileGood(14, 4); ft.setDefendTileBad(14, 12); Game1.creatures.Add(ft); Strawberry sb = new Strawberry(9 * 32, 7 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(10 * 32, 7 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(11 * 32, 7 * 32); Game1.miscObjects.Add(sb); sb = new Strawberry(12 * 32, 7 * 32); Game1.miscObjects.Add(sb); Game1.miscObjects.Add(new Strawberry(8 * 32, 7 * 32)); Game1.miscObjects.Add(new Strawberry(13 * 32, 7 * 32)); //level tiles levelTiles.Add(new LevelTile(2 * 32, 4 * 32, "blackBlock", "blackBlock", "laserIntroLevel",new Point(25 * 32, 25 * 32))); levelTiles.Add(new LevelTile(20 * 32, 12 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(19 * 32, 7 * 32))); }
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; }
public override void loadLevelObjects() { for (int i = 3; i <= 9; i += 2) { for (int j = 5; j <= 7; j += 2) { Desk d = new Desk(i * 32, j * 32); Game1.miscObjects.Add(d); } } //laser puzzle objects Gate laserGate = new Gate(55 * 32, 5 * 32); Button bt = new ButtonHeavy(50 * 32, 5 * 32, laserGate); Game1.miscObjects.Add(bt); Game1.miscObjects.Add(laserGate); Gate gate4 = new Gate(40 * 32, 23 * 32); Button bt2 = new ButtonHeavy(52 * 32, 16 * 32, gate4); Game1.miscObjects.Add(bt2); Game1.miscObjects.Add(gate4); bool lasDir = false; for (int i = 21; i < 59; i++) { for (int j = 2; j < 9; j++) { if (((i % 12) == 0) && ((j - 3) % 4 == 0)) { Game1.miscObjects.Add(new LaserBlock(i * 32, j * 32, lasDir)); lasDir = !lasDir; } } if ((i % 12) == 0) { lasDir = !lasDir; } } Game1.miscObjects.Add(new LaserBlock(49 * 32, 5 * 32, true)); Game1.miscObjects.Add(new VineMoveBlock(30 * 32, 5 * 32)); //end laser puzzle Gate myGate = new Gate(2 * 32, 4 * 32); Game1.miscObjects.Add(myGate); ChalkboardTop ch = new ChalkboardTop(5 * 32, 0 * 32, myGate); Game1.miscObjects.Add(ch); Game1.visuals.Add(new HiddenArrow(6 * 32, 2 * 32)); Gate gate2 = new Gate(2 * 32, 17 * 32); Game1.miscObjects.Add(gate2); Button myButton = new ButtonHeavy(32 * 2, 32 * 16, gate2); Game1.miscObjects.Add(myButton); Gate gate3 = new Gate(16 * 32, 22 * 32); Game1.miscObjects.Add(gate3); myButton = new ButtonPlayer(32 * 1, 32 * 23, gate3); Game1.miscObjects.Add(myButton); Game1.miscObjects.Add(new VineMoveBlock(32 * 3, 32 * 18)); Game1.miscObjects.Add(new VineMoveBlock(32 * 3, 32 * 19)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 3)); FlowerTentacles ft = new FlowerTentacles(32 * 4, 32 * 6); Game1.creatures.Add(ft); ft.setDefendTileGood(4, 6); ft.setDefendTileBad(3, 4); ft = new FlowerTentacles(32 * 6, 32 * 6); Game1.creatures.Add(ft); ft.setDefendTileGood(6, 6); ft.setDefendTileBad(9, 3); ft = new FlowerTentacles(32 * 8, 32 * 6); Game1.creatures.Add(ft); ft.setDefendTileGood(8, 6); ft.setDefendTileBad(10, 3); ft = new FlowerTentacles(32 * 3, 32 * 25); Game1.creatures.Add(ft); ft.setDefendTileGood(3, 25); ft.setDefendTileBad(3, 22); Game1.miscObjects.Add(new Strawberry(40 * 32, 19 * 32)); //Game1.miscObjects.Add(new Strawberry(44 * 32, 19 * 32)); Game1.miscObjects.Add(new VineMoveBlock(44 * 32, 23 * 32)); Game1.miscObjects.Add(new VineMoveBlock(48 * 32, 23 * 32)); Game1.miscObjects.Add(new VineMoveBlock(56 * 32, 19 * 32)); Game1.miscObjects.Add(new VineMoveBlock(56 * 32, 15 * 32)); Game1.miscObjects.Add(new VineMoveBlock(48 * 32, 19 * 32)); /* * ft = new FlowerTentacles(32 * 11, 32 * 11); * Game1.creatures.Add(ft); * ft.setDefendTileGood(11, 11); * ft.setDefendTileBad(12, 8); * * //ft = new FlowerTentacles(500, 400, worldState); * //creatures.Add(ft); * * VineMoveBlock vm = new VineMoveBlock(32 * 10, 32 * 5); * Game1.miscObjects.Add(vm); */ //leveltiles levelTiles.Add(new LevelTile(34 * 32, 26 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(35 * 32, 9 * 32))); }
protected override void LoadContent() { width = GraphicsDevice.PresentationParameters.Bounds.Width; height = GraphicsDevice.PresentationParameters.Bounds.Height; // 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])); } for (int x = 0; x < Textures.tileNames.Length; x++) { Textures.textures.Add(Textures.tileNames[x], Content.Load <Texture2D>("Tile/" + Textures.tileNames[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); * } * } * */ inventory = new Inventory(300, 300); player = new Player(32 * 19, 32 * 5, worldState, inventory, this); creatures.Add(player); FlowerTentacles ft = new FlowerTentacles(32 * 11, 32 * 4, worldState); creatures.Add(ft); ft.setDefendTileGood(11, 4); ft.setDefendTileBad(11, 7); ft = new FlowerTentacles(32 * 12, 32 * 4, worldState); creatures.Add(ft); ft.setDefendTileGood(12, 4); ft.setDefendTileBad(12, 6); ft = new FlowerTentacles(32 * 12, 32 * 11, worldState); creatures.Add(ft); ft.setDefendTileGood(12, 11); ft.setDefendTileBad(13, 7); ft = new FlowerTentacles(32 * 11, 32 * 11, worldState); creatures.Add(ft); ft.setDefendTileGood(11, 11); ft.setDefendTileBad(12, 8); //ft = new FlowerTentacles(500, 400, worldState); //creatures.Add(ft); GreenBlock b = new GreenBlock(32 * 12, 32 * 7, worldState); items.Add(b); song = Content.Load <Song>("whitesky"); song2 = Content.Load <Song>("climbing_up_the_walls"); MediaPlayer.Play(song); makeMapFromFile("home.txt"); //MediaPlayer.IsRepeating = true; }
public override void loadLevelObjects() { for(int i = 3; i <= 9; i+=2) { for(int j = 5; j<= 7; j+=2) { Desk d = new Desk(i * 32, j * 32); Game1.miscObjects.Add(d); } } //laser puzzle objects Gate laserGate = new Gate(55 * 32, 5 * 32); Button bt = new ButtonHeavy(50 * 32, 5 * 32, laserGate); Game1.miscObjects.Add(bt); Game1.miscObjects.Add(laserGate); Gate gate4 = new Gate(40 * 32, 23 * 32); Button bt2 = new ButtonHeavy(52 * 32, 16 * 32, gate4); Game1.miscObjects.Add(bt2); Game1.miscObjects.Add(gate4); bool lasDir = false; for (int i = 21; i < 59; i ++) { for (int j = 2; j < 9; j ++) { if (((i % 12) == 0) && ((j - 3) % 4 == 0)) { Game1.miscObjects.Add(new LaserBlock(i * 32, j * 32, lasDir)); lasDir = !lasDir; } } if ((i % 12) == 0) { lasDir = !lasDir; } } Game1.miscObjects.Add(new LaserBlock(49 * 32, 5 * 32,true)); Game1.miscObjects.Add(new VineMoveBlock(30 * 32, 5 * 32)); //end laser puzzle Gate myGate = new Gate(2 * 32, 4 * 32); Game1.miscObjects.Add(myGate); ChalkboardTop ch = new ChalkboardTop(5 * 32, 0 * 32, myGate); Game1.miscObjects.Add(ch); Game1.visuals.Add(new HiddenArrow(6 * 32, 2 * 32)); Gate gate2 = new Gate(2 * 32, 17 * 32); Game1.miscObjects.Add(gate2); Button myButton = new ButtonHeavy(32 * 2, 32 * 16, gate2); Game1.miscObjects.Add(myButton); Gate gate3 = new Gate(16 * 32, 22 * 32); Game1.miscObjects.Add(gate3); myButton = new ButtonPlayer(32 * 1, 32 * 23, gate3); Game1.miscObjects.Add(myButton); Game1.miscObjects.Add(new VineMoveBlock(32 * 3, 32 * 18)); Game1.miscObjects.Add(new VineMoveBlock(32 * 3, 32 * 19)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 3)); FlowerTentacles ft = new FlowerTentacles(32 * 4, 32 * 6); Game1.creatures.Add(ft); ft.setDefendTileGood(4, 6); ft.setDefendTileBad(3, 4); ft = new FlowerTentacles(32 * 6, 32 * 6); Game1.creatures.Add(ft); ft.setDefendTileGood(6, 6); ft.setDefendTileBad(9, 3); ft = new FlowerTentacles(32 * 8, 32 * 6); Game1.creatures.Add(ft); ft.setDefendTileGood(8, 6); ft.setDefendTileBad(10, 3); ft = new FlowerTentacles(32 * 3, 32 * 25); Game1.creatures.Add(ft); ft.setDefendTileGood(3, 25); ft.setDefendTileBad(3, 22); Game1.miscObjects.Add(new Strawberry(40 * 32,19 * 32)); //Game1.miscObjects.Add(new Strawberry(44 * 32, 19 * 32)); Game1.miscObjects.Add(new VineMoveBlock(44 * 32, 23 * 32)); Game1.miscObjects.Add(new VineMoveBlock(48 * 32, 23 * 32)); Game1.miscObjects.Add(new VineMoveBlock(56 * 32, 19 * 32)); Game1.miscObjects.Add(new VineMoveBlock(56 * 32, 15 * 32)); Game1.miscObjects.Add(new VineMoveBlock(48 * 32, 19 * 32)); /* ft = new FlowerTentacles(32 * 11, 32 * 11); Game1.creatures.Add(ft); ft.setDefendTileGood(11, 11); ft.setDefendTileBad(12, 8); //ft = new FlowerTentacles(500, 400, worldState); //creatures.Add(ft); VineMoveBlock vm = new VineMoveBlock(32 * 10, 32 * 5); Game1.miscObjects.Add(vm); */ //leveltiles levelTiles.Add(new LevelTile(34 * 32, 26 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(35 * 32, 9 * 32))); }
public override void loadLevelObjects() { Gate myGate = new Gate(32 * 5, 32 * 10); Game1.miscObjects.Add(myGate); Button myButton = new ButtonPlayer(32 * 9, 32 * 8, myGate); Game1.miscObjects.Add(myButton); myGate = new Gate(32 * 41, 32 * 13); Game1.miscObjects.Add(myGate); myButton = new ButtonHeavy(32 * 42, 32 * 7, myGate); Game1.miscObjects.Add(myButton); myGate = new Gate(32 * 33, 32 * 15); Game1.miscObjects.Add(myGate); myButton = new ButtonHeavy(32 * 34, 32 * 15, myGate); Game1.miscObjects.Add(myButton); myGate = new Gate(32 * 33, 32 * 5); Game1.miscObjects.Add(myGate); myButton = new ButtonHeavy(32 * 25, 32 * 1, myGate); Game1.miscObjects.Add(myButton); Strawberry sb = new Strawberry(32 * 43, 32 * 15); Game1.miscObjects.Add(sb); sb = new Strawberry(32 * 25, 32 * 7); Game1.miscObjects.Add(sb); sb = new Strawberry(32 * 4, 32 * 7); Game1.miscObjects.Add(sb); FlowerTentacles ft = new FlowerTentacles(2 * 32, 8 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(2, 8); ft.setDefendTileBad(3, 9); ft = new FlowerTentacles(1 * 32, 9 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(1, 9); ft.setDefendTileBad(2, 10); ft = new FlowerTentacles(8 * 32, 8 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(7, 11); ft.setDefendTileBad(8, 8); ft = new FlowerTentacles(10 * 32, 9 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(17, 8); ft.setDefendTileBad(10, 8); ft = new FlowerTentacles(9 * 32, 9 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(13, 12); ft.setDefendTileBad(9, 9); DogBoogieman dbm = new DogBoogieman(32 * 25, 32 * 3, new Point(1, 1), new Point(44, 5)); Game1.creatures.Add(dbm); dbm.setDefendTileGood(25, 3); //dbm.setAttackTarget(ref player); VineMoveBlock vm = new VineMoveBlock(32 * 34, 32 * 5); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 41, 32 * 14); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 42, 32 * 11); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 42, 32 * 8); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 26, 32 * 5); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 6, 32 * 10); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 20, 32 * 10); Game1.miscObjects.Add(vm); Game1.miscObjects.Add(new VineMoveBlock(32 * 1, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 2, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 2, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 2, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 3, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 4, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 6, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 7, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 7, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 7, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 8, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 4, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 5)); Game1.miscObjects.Add(new VineMoveBlock(32 * 9, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 11, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 9, 32 * 1)); Game1.miscObjects.Add(new VineMoveBlock(32 * 9, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 11, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 11, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 5)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 1)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 17, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 18, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 20, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 21, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 17, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 18, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 19, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 20, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 17, 32 * 5)); //leveltiles levelTiles.Add(new LevelTile(24 * 32, 17 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(9 * 32, 9 * 32))); }
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; }
public override void loadLevelObjects() { Gate myGate = new Gate(32 * 5, 32 * 10); Game1.miscObjects.Add(myGate); Button myButton = new ButtonPlayer(32 * 9, 32 * 8, myGate); Game1.miscObjects.Add(myButton); myGate = new Gate(32 * 41, 32 * 13); Game1.miscObjects.Add(myGate); myButton = new ButtonHeavy(32 * 42, 32 * 7, myGate); Game1.miscObjects.Add(myButton); myGate = new Gate(32 * 33, 32 * 15); Game1.miscObjects.Add(myGate); myButton = new ButtonHeavy(32 * 34, 32 * 15, myGate); Game1.miscObjects.Add(myButton); myGate = new Gate(32 * 33, 32 * 5); Game1.miscObjects.Add(myGate); myButton = new ButtonHeavy(32 * 25, 32 * 1, myGate); Game1.miscObjects.Add(myButton); Strawberry sb = new Strawberry(32 * 43, 32 * 15); Game1.miscObjects.Add(sb); sb = new Strawberry(32 * 25, 32 * 7); Game1.miscObjects.Add(sb); sb = new Strawberry(32 * 4, 32 * 7); Game1.miscObjects.Add(sb); FlowerTentacles ft = new FlowerTentacles(2 * 32, 8 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(2, 8); ft.setDefendTileBad(3, 9); ft = new FlowerTentacles(1 * 32, 9 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(1, 9); ft.setDefendTileBad(2, 10); ft = new FlowerTentacles(8 * 32, 8 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(7, 11); ft.setDefendTileBad(8, 8); ft = new FlowerTentacles(10 * 32, 9 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(17, 8); ft.setDefendTileBad(10, 8); ft = new FlowerTentacles(9 * 32, 9 * 32); Game1.creatures.Add(ft); ft.setDefendTileGood(13, 12); ft.setDefendTileBad(9, 9); DogBoogieman dbm = new DogBoogieman(32 * 25, 32 * 3, new Point(1,1), new Point(44,5)); Game1.creatures.Add(dbm); dbm.setDefendTileGood(25, 3); //dbm.setAttackTarget(ref player); VineMoveBlock vm = new VineMoveBlock(32 * 34, 32 * 5); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 41, 32 * 14); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 42, 32 * 11); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 42, 32 * 8); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 26, 32 * 5); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 6, 32 * 10); Game1.miscObjects.Add(vm); vm = new VineMoveBlock(32 * 20, 32 * 10); Game1.miscObjects.Add(vm); Game1.miscObjects.Add(new VineMoveBlock(32 * 1, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 2, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 2, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 2, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 3, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 4, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 6, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 7, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 7, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 7, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 8, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 4, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 5, 32 * 5)); Game1.miscObjects.Add(new VineMoveBlock(32 * 9, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 10, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 11, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 9, 32 * 1)); Game1.miscObjects.Add(new VineMoveBlock(32 * 9, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 11, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 11, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 13, 32 * 5)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 1)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 3)); Game1.miscObjects.Add(new VineMoveBlock(32 * 15, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 17, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 18, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 20, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 21, 32 * 2)); Game1.miscObjects.Add(new VineMoveBlock(32 * 17, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 18, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 19, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 20, 32 * 4)); Game1.miscObjects.Add(new VineMoveBlock(32 * 17, 32 * 5)); //leveltiles levelTiles.Add(new LevelTile(24 * 32, 17 * 32, "blackBlock", "blackBlock", "hubLevel", new Point(9 * 32, 9 * 32))); }
protected override void LoadContent() { width = GraphicsDevice.PresentationParameters.Bounds.Width; height = GraphicsDevice.PresentationParameters.Bounds.Height; // 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])); } for(int x = 0; x < Textures.tileNames.Length; x++) { Textures.textures.Add(Textures.tileNames[x], Content.Load<Texture2D>("Tile/" + Textures.tileNames[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); } } * */ inventory = new Inventory(300, 300); player = new Player(32*19, 32*5, worldState, inventory, this); creatures.Add(player); FlowerTentacles ft = new FlowerTentacles(32*11, 32*4, worldState); creatures.Add(ft); ft.setDefendTileGood(11, 4); ft.setDefendTileBad(11, 7); ft = new FlowerTentacles(32 * 12, 32 * 4, worldState); creatures.Add(ft); ft.setDefendTileGood(12, 4); ft.setDefendTileBad(12, 6); ft = new FlowerTentacles(32 * 12, 32 * 11, worldState); creatures.Add(ft); ft.setDefendTileGood(12, 11); ft.setDefendTileBad(13, 7); ft = new FlowerTentacles(32 * 11, 32 * 11, worldState); creatures.Add(ft); ft.setDefendTileGood(11, 11); ft.setDefendTileBad(12, 8); //ft = new FlowerTentacles(500, 400, worldState); //creatures.Add(ft); GreenBlock b = new GreenBlock(32*12, 32*7, worldState); items.Add(b); song = Content.Load<Song>("whitesky"); song2 = Content.Load<Song>("climbing_up_the_walls"); MediaPlayer.Play(song); makeMapFromFile("home.txt"); //MediaPlayer.IsRepeating = true; }