private static Team readTeam(LayerObject obj) { int team = obj.getIntProperty("Team", -1); if (team == 0) { return Team.BLUE; } else if (team == 1) { return Team.RED; } return null; }
private static void createChainLights(TiledMap map, PooledEngine engine) { for (Layer layer : map.getLayers()) { if (layer.isObjectLayer()) { for (LayerObject obj : layer.getObjects()) { String entitytype = obj.getProperty("Entitytype", null); if (entitytype != null && entitytype.toLowerCase().equals("chainlight")) { createChainLight( engine, obj.getX(), obj.getY(), Color.valueOf(obj.getProperty("color", "FFFFFF")), obj.getFloatProperty("distance", 200), obj.getIntProperty("direction", 1), obj.getPoints()); } } } } }