private void checkForSwitchToLevelFour() { if (darwin.isOnTop(secondStair)) { mainGame.setCurLevel(Game1.LevelState.Level4); zTime.reset(); mainGame.setZTimeLevel(zTime, Game1.LevelState.Level4); darwin.setHuman(); gameState.setState(GameState.state.Start); gameOver = false; gameWin = false; } }
private void checkUpdateToLevelThree() { if (darwin.isOnTop(stairs)) { board.setGridPositionOpen(darwin); darwin.setGridPosition(21, 20); mainGame.setCurLevel(Game1.LevelState.Level3); mainGame.setZTimeLevel(zTime, Game1.LevelState.Level3); resetZombies(); darwin.setHuman(); gameState.setState(GameState.state.Start); gameOver = false; gameWin = false; } }
private void checkForSwitchToLevelTwo() { if (darwin.isOnTop(stairs)) { mainGame.setCurLevel(Game1.LevelState.Level2); mainGame.setZTimeLevel(zTime, Game1.LevelState.Level2); gameOver = false; gameWin = false; board.setGridPositionOpen(darwin); darwin.setGridPosition(2, 20); zTime.reset(); board.setGridPositionOpen(firstZombie); board.setGridPositionOpen(secondZombie); board.setGridPositionOpen(thirdZombie); board.setGridPositionOpen(fourthZombie); board.setGridPositionOpen(fifthZombie); board.setGridPositionOpen(sixthZombie); board.setGridPositionOpen(brain); board.setGridPositionOpen(potion); firstZombie.setGridPosition(10, 10); board.setGridPositionOccupied(firstZombie.X, firstZombie.Y); firstZombie.setZombieAlive(true); secondZombie.setGridPosition(10, 16); board.setGridPositionOccupied(secondZombie.X, secondZombie.Y); secondZombie.setZombieAlive(true); thirdZombie.setGridPosition(12, 10); board.setGridPositionOccupied(thirdZombie.X, thirdZombie.Y); thirdZombie.setZombieAlive(true); fourthZombie.setGridPosition(20, 7); board.setGridPositionOccupied(fourthZombie.X, fourthZombie.Y); fourthZombie.setZombieAlive(true); fifthZombie.setGridPosition(22, 10); board.setGridPositionOccupied(fifthZombie.X, fifthZombie.Y); fifthZombie.setZombieAlive(true); sixthZombie.setGridPosition(22, 10); board.setGridPositionOccupied(sixthZombie.X, sixthZombie.Y); sixthZombie.setZombieAlive(true); potion.setGridPosition(25, 4); brain.setGridPosition(3, 3); brain.setVisible(true); board.setGridPositionOccupied(brain.X, brain.Y); firstSwitch.turnOn(); potion.reset(); darwin.setHuman(); darwin.setDarwinAlive(); fellDownCounter = 0; fellDownPit = false; gameState.setState(GameState.state.Start); } }