polygon.setPosition(x, y); object = new PolygonMapObject(polygon); } else if ((child = element.getChildByName("polyline")) != null) {
polygon.setPosition(x, y); object = new PolygonMapObject(polygon); } else if ((child = element.getChildByName("polyline")) != null) {
public void setPosition(float x, float y) { bbox.setPosition(x, y); }
public static void parsePolygon(Polygon p, String v, String pos) { parsePolygon(p, v); Vector2 v2 = parseVector2(pos); p.setPosition(v2.x, v2.y); }
public void setPosition(float x, float y) { bbox.setPosition(x, y); if (scene != null && id.equals(scene.getWalkZone())) { scene.getPolygonalNavGraph().createInitialGraph(this, scene.getActors().values()); } }
public void setPosition(float x, float y) { boolean inNavGraph = false; if (scene != null && scene.getPolygonalNavGraph() != null) { inNavGraph = scene.getPolygonalNavGraph().removeDinamicObstacle(bbox); } bbox.setPosition(x, y); if (inNavGraph) { scene.getPolygonalNavGraph().addDinamicObstacle(bbox); } }
@Override public void read(Json json, JsonValue jsonData) { BladeJson bjson = (BladeJson) json; if (bjson.getMode() == Mode.MODEL) { id = json.readValue("id", String.class, jsonData); float[] verts = json.readValue("bbox", float[].class, jsonData); if (verts.length > 0) bbox.setVertices(verts); } else { } Vector2 pos = json.readValue("pos", Vector2.class, jsonData); if (pos != null) { float worldScale = EngineAssetManager.getInstance().getScale(); bbox.setPosition(pos.x * worldScale, pos.y * worldScale); bbox.setScale(worldScale, worldScale); visible = json.readValue("visible", boolean.class, visible, jsonData); } } }
polygon.setPosition(x, y); object = new PolygonMapObject(polygon); } else if ((child = element.getChildByName("polyline")) != null) {
polygon.setPosition(x, y); object = new PolygonMapObject(polygon); } else if ((child = element.getChildByName("polyline")) != null) {
walkZonePol.setPosition(walkZonePol.getX() * worldScale, walkZonePol.getY() * worldScale); wz.bbox.setVertices(walkZonePol.getVertices()); wz.bbox.setScale(walkZonePol.getScaleX(), walkZonePol.getScaleY()); wz.bbox.setPosition(walkZonePol.getX(), walkZonePol.getY()); wz.setScene(this); wz.setInitScene(id);