Package demos.small_games.snake
Class SnakeScene
java.lang.Object
pi.Scene
demos.small_games.snake.SnakeScene
- All Implemented Interfaces:
FrameUpdateListener,FrameUpdateListenerRegistration,KeyStrokeListenerRegistration,MouseClickListenerRegistration,MouseScrollListenerRegistration,RenderSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidvoidonFrameUpdate(double timeInS) Diese Methode wird bei einem (angemeldeten) Objekt bei jedem Einzelbild erneut aufgerufen.voidvoidsetScore(int score) 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.KeyStrokeListenerRegistration
addKeyStrokeListener, removeKeyStrokeListenerMethods inherited from interface pi.event.MouseClickListenerRegistration
addMouseClickListener, removeMouseClickListenerMethods inherited from interface pi.event.MouseScrollListenerRegistration
addMouseScrollListener, removeMouseScrollListener
-
Constructor Details
-
SnakeScene
public SnakeScene()
-
-
Method Details
-
setScore
public void setScore(int score) -
increaseScore
public void increaseScore() -
placeRandomGoodie
public void placeRandomGoodie() -
onFrameUpdate
public void onFrameUpdate(double timeInS) Description copied from interface:FrameUpdateListenerDiese Methode wird bei einem (angemeldeten) Objekt bei jedem Einzelbild erneut aufgerufen.- Specified by:
onFrameUpdatein interfaceFrameUpdateListener- Parameters:
timeInS- Die Zeit in Sekunden, die seit der letzten Aktualisierung vergangen ist.
-
main
-