Commit 87fab91f authored by v.tarantik's avatar v.tarantik

Uprava poradi map v Pronasledovani

parent 9e91a723
...@@ -98,24 +98,24 @@ public class PronasledovaniActivity extends GameActivity implements IOnSceneTouc ...@@ -98,24 +98,24 @@ public class PronasledovaniActivity extends GameActivity implements IOnSceneTouc
private static final int GRID_OFFSET_Y = 10; private static final int GRID_OFFSET_Y = 10;
private static final String MAP_BITMAPS_EXTENSION = ".png"; private static final String MAP_BITMAPS_EXTENSION = ".png";
private static final String[] maps = new String[] { "mapa1", "mapa3", "mapa4", "mapa2", "mapa5", "mapa6", "mapa7", "mapa8", "mapa9", "mapa10", "mapa11", "mapa12", "mapa13", "mapa14" }; private static final String[] maps = new String[] { "mapa1", "mapa5", "mapa3", "mapa4", "mapa2", "mapa6", "mapa7", "mapa8", "mapa9", "mapa10", "mapa11", "mapa12", "mapa13", "mapa14" };
private static final ArrayList<Entry<Position, Position>> carStartAndEndPoints = new ArrayList<Map.Entry<Position, Position>>(); private static final ArrayList<Entry<Position, Position>> carStartAndEndPoints = new ArrayList<Map.Entry<Position, Position>>();
{ {
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1140, 1230), new Position(340, 250))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1140, 1230), new Position(340, 250)));//1
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(101, 769), new Position(1027, 381))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1215, 1140), new Position(1115, 230)));//5
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1231, 875), new Position(237, 555))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(101, 769), new Position(1027, 381)));//3
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(830, 1161), new Position(271, 397))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1231, 875), new Position(237, 555)));//4
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1215, 1140), new Position(1115, 230))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(830, 1161), new Position(271, 397)));//2
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1233, 1075), new Position(589, 885))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1233, 1075), new Position(589, 885)));//6
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(725, 1230), new Position(465, 230))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(725, 1230), new Position(465, 230)));//7
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(205, 1049), new Position(1080, 297))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(205, 1049), new Position(1080, 297)));//8
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(180, 1200), new Position(1050, 220))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(180, 1200), new Position(1050, 220)));//9
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(291, 1213), new Position(987, 211))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(291, 1213), new Position(987, 211)));//10
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(791, 1161), new Position(271, 397))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(791, 1161), new Position(271, 397)));//11
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1163, 1083), new Position(263, 193))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(1163, 1083), new Position(263, 193)));//12
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(100, 1220), new Position(1140, 350))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(100, 1220), new Position(1140, 350)));//13
carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(233, 1200), new Position(415, 210))); carStartAndEndPoints.add(new AbstractMap.SimpleEntry<Position, Position>(new Position(233, 1200), new Position(415, 210)));//14
} }
...@@ -534,7 +534,7 @@ public class PronasledovaniActivity extends GameActivity implements IOnSceneTouc ...@@ -534,7 +534,7 @@ public class PronasledovaniActivity extends GameActivity implements IOnSceneTouc
Position translatedPosFlag = PronasledovaniHelper.translatePositionAccordingToRotation(new Position(flagStartPosX, flagStartPosY), cards.get(0).getRotation() * 90, new Position( Position translatedPosFlag = PronasledovaniHelper.translatePositionAccordingToRotation(new Position(flagStartPosX, flagStartPosY), cards.get(0).getRotation() * 90, new Position(
displaySize.x / 2, displaySize.y / 2)); displaySize.x / 2, displaySize.y / 2));
vehicleType = getVehicleTypeByMap(textureID); vehicleType = getVehicleTypeByMap(maps[textureID]);
vehicleTextureRegion = texturesGenerator.getRandomVehicleTextureRegion(vehicleType); vehicleTextureRegion = texturesGenerator.getRandomVehicleTextureRegion(vehicleType);
...@@ -1267,17 +1267,12 @@ public class PronasledovaniActivity extends GameActivity implements IOnSceneTouc ...@@ -1267,17 +1267,12 @@ public class PronasledovaniActivity extends GameActivity implements IOnSceneTouc
super.onDrawerSlide(drawerView, slideOffset); super.onDrawerSlide(drawerView, slideOffset);
} }
private VehicleTypeEnum getVehicleTypeByMap(int textureID) { private VehicleTypeEnum getVehicleTypeByMap(String mapName) {
// vozitko if (mapName.equals("mapa2") || mapName.equals("mapa13")) {
switch (textureID) { return VehicleTypeEnum.BOAT;
case 3: } else if (mapName.equals("mapa7")) {
case 12: return VehicleTypeEnum.TRAIN;
return VehicleTypeEnum.BOAT;
case 6:
return VehicleTypeEnum.TRAIN;
default:
return random.nextBoolean() ? VehicleTypeEnum.CAR : VehicleTypeEnum.MOTORCYCLE;
} }
return random.nextBoolean() ? VehicleTypeEnum.CAR : VehicleTypeEnum.MOTORCYCLE;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment