public void Initialize() { gameOverPosition.X = 320; gameOverPosition.Y = 130; device = graphics.GraphicsDevice; gameState = new GameState(); gameStart = new GameStart(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight); gameState.setState(GameState.state.Level); board = new GameBoard(new Vector2(33, 25), new Vector2(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight)); darwin = new Darwin(board); String zombieString = "This a zombie,\n don't near him \nas a human!!"; zombieMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, zombieString); String darwinString = "This is darwin,\n move with arrows, \n z to transform, \n a for actions"; darwinMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, darwinString); stairs = new Stairs(board); if (board.isGridPositionOpen(5, 18)) { stairs.setGridPosition(5, 18); } // Initial starting position darwin.setGridPosition(6, 18); if (board.isGridPositionOpen(darwin)) { board.setGridPositionOccupied(darwin.X, darwin.Y); darwin.setPosition(board.getPosition(darwin).X, board.getPosition(darwin).Y); } // Darwin's lag movement counterReady = counter = 5; zTime = new ZombieTime(board); zTimeReset = new ZombieTime(board); setPotionPosition(27, 5); setBoxes(); setBoxPattern(); pattern = new BoxPattern(board, spotsForPattern); setVortexes(); setWalls(); snake = new Snake(10, 9, 27, 5, 18, 5, board); snake2 = new Snake(8, 15, 27, 5, 18, 5, board); snake3 = new Snake(21, 9, 27, 5, 18, 5, board); snake4 = new Snake(21, 15, 27, 5, 18, 5, board); northZombie = new PyroZombie(15, 3, 25, 4, 3, 3, board); northZombie.setGridPosition(15, 3); northZombie.setCurrentPatrolPoint(new Vector2(27, 3)); northZombie.setNextPatrolPoint(new Vector2(5, 3)); southZombie = new PyroZombie(15, 20, 25, 4, 20, 20, board); southZombie.setGridPosition(15, 20); southZombie.setCurrentPatrolPoint(new Vector2(5, 20)); southZombie.setNextPatrolPoint(new Vector2(27, 20)); eastZombie = new PyroZombie(29, 11, 29, 29, 19, 4, board); eastZombie.setGridPosition(29, 11); eastZombie.setCurrentPatrolPoint(new Vector2(29, 17)); eastZombie.setNextPatrolPoint(new Vector2(29, 6)); westZombie = new PyroZombie(3, 11, 3, 3, 19, 4, board); westZombie.setGridPosition(3, 11); westZombie.setCurrentPatrolPoint(new Vector2(3, 5)); westZombie.setNextPatrolPoint(new Vector2(3, 18)); flames = new LinkedList<Flame>(); }
public void Initialize() { gameOverPosition.X = 320; gameOverPosition.Y = 130; device = graphics.GraphicsDevice; gameState = new GameState(); gameStart = new GameStart(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight); gameState.setState(GameState.state.Start); board = new GameBoard(new Vector2(33, 25), new Vector2(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight)); darwin = new Darwin(board); //firstZombie = new Zombie(10, 10, 15, 5, 15, 5, board); //secondZombie = new Zombie(10, 16, 15, 5, 15, 5, board); //thirdZombie = new Zombie(12, 10, 15, 5, 15, 5, board); Vector2[] myPath = new Vector2[4]; myPath[0] = new Vector2(8, 4); myPath[1] = new Vector2(8, 19); myPath[2] = new Vector2(25, 19); myPath[3] = new Vector2(25, 4); leaderZombie = new CongaLeaderZombie(8, 4, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath, darwin, board); followerZombies = new List<CongaFollowerZombie>(); // all conga paths for the different conga zombies are created here along with all conga zombies myPath = new Vector2[8]; myPath[0] = new Vector2(8,4); myPath[1] = new Vector2(8, 12); myPath[2] = new Vector2(8,19); myPath[3] = new Vector2(17, 19); myPath[4] = new Vector2(25,19); myPath[5] = new Vector2(25, 12); myPath[6] = new Vector2(25,4); myPath[7] = new Vector2(17, 4); followerZombies.Add(new CongaFollowerZombie(10,4,board.getNumSquaresX(),0,board.getNumSquaresY(),0,myPath,leaderZombie,darwin,board)); followerZombies.Add(new CongaFollowerZombie(12, 4, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath, leaderZombie,darwin, board)); followerZombies.Add(new CongaFollowerZombie(14, 4, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath, leaderZombie,darwin, board)); myPath = new Vector2[8]; myPath[2] = new Vector2(8, 4); myPath[3] = new Vector2(8, 12); myPath[4] = new Vector2(8, 19); myPath[5] = new Vector2(17, 19); myPath[6] = new Vector2(25, 19); myPath[7] = new Vector2(25, 12); myPath[0] = new Vector2(25, 4); myPath[1] = new Vector2(17, 4); followerZombies.Add(new CongaFollowerZombie(25, 8, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(25, 10, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(25, 14, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); myPath = new Vector2[8]; myPath[4] = new Vector2(8, 4); myPath[5] = new Vector2(8, 12); myPath[6] = new Vector2(8, 19); myPath[7] = new Vector2(17, 19); myPath[0] = new Vector2(25, 19); myPath[1] = new Vector2(25, 12); myPath[2] = new Vector2(25, 4); myPath[3] = new Vector2(17, 4); followerZombies.Add(new CongaFollowerZombie(22, 19, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(16, 19, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(14, 19, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); myPath = new Vector2[8]; myPath[6] = new Vector2(8, 4); myPath[7] = new Vector2(8, 12); myPath[0] = new Vector2(8, 19); myPath[1] = new Vector2(17, 19); myPath[2] = new Vector2(25, 19); myPath[3] = new Vector2(25, 12); myPath[4] = new Vector2(25, 4); myPath[5] = new Vector2(17, 4); followerZombies.Add(new CongaFollowerZombie(8, 12, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(8, 15, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); myPath = new Vector2[8]; myPath[3] = new Vector2(8, 4); myPath[4] = new Vector2(8, 12); myPath[5] = new Vector2(8, 19); myPath[6] = new Vector2(17, 19); myPath[7] = new Vector2(25, 19); myPath[0] = new Vector2(25, 16); myPath[1] = new Vector2(25, 4); myPath[2] = new Vector2(17, 4); followerZombies.Add(new CongaFollowerZombie(29, 17, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(29, 15, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(29, 16, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(29, 13, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); myPath = new Vector2[8]; myPath[7] = new Vector2(8, 4); myPath[0] = new Vector2(8, 7); myPath[1] = new Vector2(8, 19); myPath[2] = new Vector2(17, 19); myPath[3] = new Vector2(25, 19); myPath[4] = new Vector2(25, 12); myPath[5] = new Vector2(25, 4); myPath[6] = new Vector2(17, 4); followerZombies.Add(new CongaFollowerZombie(4, 7, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(4, 9, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(4, 8, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); followerZombies.Add(new CongaFollowerZombie(4, 10, board.getNumSquaresX(), 0, board.getNumSquaresY(), 0, myPath,leaderZombie, darwin, board)); leaderZombie.setFollowers(followerZombies); String zombieString = "This a zombie,\n don't near him \nas a human!!"; zombieMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, zombieString); String darwinString = "This is darwin,\n move with arrows, \n z to transform, \n a for actions"; darwinMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, darwinString); String switchString = "This is a switch\n face it and press A\n to see what happens!!"; switchMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, switchString); stairs = new Stairs(board); BasicObject[] removableWalls = setRemovableWallsSwitchOne(); BasicObject switchSquare = new BasicObject(board); switchSquare.X = 31; switchSquare.Y = 8; firstSwitch = new Switch(switchSquare, board, removableWalls); BasicObject[] removableWalls2 = setRemovableWallsSwitchTwo(); BasicObject switchSquare2 = new BasicObject(board); switchSquare2.X = 1; switchSquare2.Y = 15; secondSwitch = new Switch(switchSquare2, board, removableWalls2); // Initial starting position darwin.setGridPosition(16, 22); if (board.isGridPositionOpen(darwin)) { board.setGridPositionOccupied(darwin.X, darwin.Y); darwin.setPosition(board.getPosition(darwin).X, board.getPosition(darwin).Y); } // Darwin's lag movement counterReady = counter = 5; if (board.isGridPositionOpen(16, 1)) { stairs.setGridPosition(16, 1); stairs.setDestination(board.getPosition(16, 1)); } zTime = new ZombieTime(board); zTimeReset = new ZombieTime(board); setPotionPosition(28, 7); setPotion2Position(1, 7); setWallsInLevelFour(); setDanceFloor(); }
public void Initialize() { gameOverPosition.X = 320; gameOverPosition.Y = 130; device = graphics.GraphicsDevice; gameState = new GameState(); gameStart = new GameStart(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight); gameState.setState(GameState.state.Level); board = new GameBoard(new Vector2(33, 25), new Vector2(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight)); darwin = new Darwin(board); String zombieString = "This a zombie,\n don't near him \nas a human!!"; zombieMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, zombieString); String darwinString = "This is darwin,\n move with arrows, \n z to transform, \n a for actions"; darwinMessage = new MessageBox(board.getPosition(12, 8).X, board.getPosition(10, 10).Y, darwinString); stairs = new Stairs(board); if (board.isGridPositionOpen(5, 18)) { stairs.setGridPosition(5, 18); } // Initial starting position darwin.setGridPosition(6, 18); if (board.isGridPositionOpen(darwin)) { board.setGridPositionOccupied(darwin.X, darwin.Y); darwin.setPosition(board.getPosition(darwin).X, board.getPosition(darwin).Y); } // Darwin's lag movement counterReady = counter = 5; zTime = new ZombieTime(board); zTimeReset = new ZombieTime(board); setPotionPosition(27, 5); setBoxes(); setBoxPattern(); pattern = new BoxPattern(board, spotsForPattern); setVortexes(); setWalls(); snake = new Snake(10, 9, 27, 5, 18, 5, board); snake2 = new Snake(8, 15, 27, 5, 18, 5, board); snake3 = new Snake(21, 9, 27, 5, 18, 5, board); snake4 = new Snake(21, 15, 27, 5, 18, 5, board); northZombie = new PyroZombie(15, 3, 25, 4, 3, 3, board); northZombie.setGridPosition(15, 3); northZombie.setCurrentPatrolPoint(new Vector2(27, 3)); northZombie.setNextPatrolPoint(new Vector2(5, 3)); southZombie = new PyroZombie(15, 20, 25, 4, 20, 20, board); southZombie.setGridPosition(15, 20); southZombie.setCurrentPatrolPoint(new Vector2(5, 20)); southZombie.setNextPatrolPoint(new Vector2(27, 20)); eastZombie = new PyroZombie(29, 11, 29, 29, 19, 4, board); eastZombie.setGridPosition(29, 11); eastZombie.setCurrentPatrolPoint(new Vector2(29, 17)); eastZombie.setNextPatrolPoint(new Vector2(29, 6)); westZombie = new PyroZombie(3, 11, 3, 3, 19, 4, board); westZombie.setGridPosition(3, 11); westZombie.setCurrentPatrolPoint(new Vector2(3, 5)); westZombie.setNextPatrolPoint(new Vector2(3, 18)); flames = new LinkedList <Flame>(); }