/** * Inits the game itself * @param stage */ @Override public void init(Stage stage) { // JavaFX-Szenengraph Wurzel Group root = new Group(); // Kameraeinstellungen ParallelCamera cam = new ParallelCamera(); cam.setNearClip(0.1); cam.setFarClip(2000.0); // Setzen der Kamera und Fenstergröße Scene scene = new Scene(root,W_WIDTH,W_HEIGHT,true); scene.setCamera(cam); // Initialisieren des LevelLoaders this.level = LevelLoader.getInstance(root); // Fenstereinstellungen der Anwendung stage.setWidth(W_WIDTH); stage.setHeight(W_HEIGHT); stage.setResizable(false); stage.setScene(scene); stage.setTitle("Verse - Jan-Philipp Roslan"); stage.show(); }
@Test public void testGetParallelCameraAdjuster() { Adjuster adjuster = Adjuster.getAdjuster(ParallelCamera.class); assertThat(adjuster, is(instanceOf(NodeAdjuster.class))); assertThat(adjuster.getNodeClass(), is(sameInstance(Node.class))); }
@Override protected Camera buildCamera() { return new ParallelCamera(); }
@Override protected Camera addCamera(Scene scene) { ParallelCamera pc = new ParallelCamera(); scene.setCamera(pc); return pc; }
@Override protected Camera addCamera(Scene scene) { ParallelCamera parallelCamera = new ParallelCamera(); scene.setCamera(parallelCamera); return parallelCamera; }
@Override protected Camera addCamera(SubScene scene) { ParallelCamera parallelCamera = new ParallelCamera(); scene.setCamera(parallelCamera); return parallelCamera; }
@Override protected Camera addCamera(SubScene scene) { ParallelCamera camera = new ParallelCamera(); scene.setCamera(camera); return camera; }
private Camera addCamera(Scene scene) { ParallelCamera pc = new ParallelCamera(); scene.setCamera(pc); return pc; }