Package blockly_robot.robot.gui.scenes
Class LevelsScene
java.lang.Object
pi.Scene
blockly_robot.robot.gui.scenes.LevelsScene
- All Implemented Interfaces:
WindowScene,FrameUpdateListenerRegistration,KeyStrokeListener,KeyStrokeListenerRegistration,MouseClickListenerRegistration,MouseScrollListenerRegistration,RenderSource
-
Constructor Summary
ConstructorsConstructorDescriptionLevelsScene(Task task, Object difficulty, int testIndex) LevelsScene(String taskPath) LevelsScene(String taskPath, Object difficulty, int testIndex) -
Method Summary
Methods inherited from class pi.Scene
actors, add, addedActors, addLayer, backgroundColor, backgroundColor, backgroundColor, camera, center, clear, focus, focusCenter, frameUpdateListeners, gravity, gravity, gravity, gravityOfEarth, info, info, info, info, info, isPhysicsPaused, keyStrokeListeners, layer, meter, mouseClickListeners, mousePosition, mouseScrollListeners, physicsPaused, remove, removeLayer, render, renderOverlay, scene, visibleArea, visibleAreaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pi.event.FrameUpdateListenerRegistration
addFrameUpdateListener, defer, delay, removeFrameUpdateListener, repeat, repeat, repeat, repeat, repeatMethods inherited from interface pi.event.KeyStrokeListener
onKeyUpMethods inherited from interface pi.event.KeyStrokeListenerRegistration
addKeyStrokeListener, removeKeyStrokeListenerMethods inherited from interface pi.event.MouseClickListenerRegistration
addMouseClickListener, removeMouseClickListenerMethods inherited from interface pi.event.MouseScrollListenerRegistration
addMouseScrollListener, removeMouseScrollListener
-
Constructor Details
-
LevelsScene
-
LevelsScene
-
LevelsScene
-
-
Method Details
-
getWidth
public double getWidth() -
getHeight
public double getHeight() -
getTitle
- Specified by:
getTitlein interfaceWindowScene- Returns:
- Eine Zeichenkette, die als Title im Fenster angezeigt werden soll.
-
getWindowBounds
- Specified by:
getWindowBoundsin interfaceWindowScene- Returns:
- Die Begrenzungen, die das Fenster umschließen soll.
-
getAssembledLevels
-
launch
-
launch
-
onKeyDown
Description copied from interface:KeyStrokeListenerWird bei einem angemeldeten Beobachter aufgerufen, sobald eine Taste gedrückt wird. Die Methode wird erst dann wieder aufgerufen, wenn die Taste losgelassen und erneut gedrückt wurde.@Override public void onKeyDown(KeyEvent event) { switch (event.getKeyCode()) { case KeyEvent.VK_UP: circle.moveBy(0, 1); break; case KeyEvent.VK_RIGHT: circle.moveBy(1, 0); break; } }- Specified by:
onKeyDownin interfaceKeyStrokeListener- Parameters:
e- EinKeyEvent-Objekt, das Informationen enthält, welche Taste gedrückt würde. Die Tastennummer kann zum Beispiel über die Methodeevent.getKeyCode()abgefragt werden.
-
main
-