public void checkColoredDoors() { if (pinkDoor.isSatisfied() && greenDoor.isSatisfied()) { fadeout.go(); if (fadeout.isDone()) { players.clear(); gsm.currentLevel = 4; gsm.setState(GameStateManager.LOADINGSTATE); } } }
public void checkRegularDoor10() { if (door10.isSatisfied()) { fadeout.go(); if (fadeout.isDone()) { gsm.currentLevel = 11; doors.remove(door10); gsm.setState(GameStateManager.LOADINGSTATE); } } }
public void populateDoors() { doors = new ArrayList<Door>(); for (int i = 0; i < doors.size(); i++) { Door d = doors.get(i); doors.remove(d); } if (gsm.getCurrentLevel() == 1) { door1 = new Door(tileMap, "normal"); door1.setPosition(580, 355); doors.add(door1); } if (gsm.getCurrentLevel() == 2) { door2 = new Door(tileMap, "normal"); door2.setPosition(80, 325); doors.add(door2); } if (gsm.getCurrentLevel() == 3) { pinkDoor = new Door(tileMap, "pink"); pinkDoor.setPosition(380, 322); doors.add(pinkDoor); greenDoor = new Door(tileMap, "green"); greenDoor.setPosition(260, 355); doors.add(greenDoor); } if (gsm.getCurrentLevel() == 4) { door4 = new Door(tileMap, "normal"); door4.setPosition(580, 291); doors.add(door4); } if (gsm.getCurrentLevel() == 5) { door5 = new Door(tileMap, "normal"); door5.setPosition(92, 161); doors.add(door5); System.out.println(door5.isSatisfied()); } if (gsm.getCurrentLevel() == 6) { door6 = new Door(tileMap, "normal"); door6.setPosition(580, 418); doors.add(door6); } if (gsm.getCurrentLevel() == 7) { door7 = new Door(tileMap, "normal"); door7.setPosition(285, 97); doors.add(door7); } if (gsm.getCurrentLevel() == 8) { door8 = new Door(tileMap, "normal"); door8.setPosition(578, 417); doors.add(door8); } if (gsm.getCurrentLevel() == 9) { door9 = new Door(tileMap, "normal"); door9.setPosition(305, 97); doors.add(door9); } if (gsm.getCurrentLevel() == 10) { door10 = new Door(tileMap, "normal"); door10.setPosition(60, 162); doors.add(door10); } }