Class App
java.lang.Object
javafx.application.Application
App
public class App
extends javafx.application.Application
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) javafx.scene.image.Image
(package private) javafx.scene.image.Image
(package private) Game
(package private) javafx.scene.canvas.GraphicsContext
(package private) int
Fields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
drawCar()
(package private) void
drawGame()
(package private) void
(package private) void
(package private) void
handleKeyPress
(javafx.scene.input.KeyEvent e) (package private) void
handleKeyRelease
(javafx.scene.input.KeyEvent e) void
start
(javafx.stage.Stage stage) Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
Field Details
-
car1
javafx.scene.image.Image car1 -
car2
javafx.scene.image.Image car2 -
gc
javafx.scene.canvas.GraphicsContext gc -
game
Game game -
milliseconds
int milliseconds
-
-
Constructor Details
-
App
public App()
-
-
Method Details
-
start
public void start(javafx.stage.Stage stage) - Specified by:
start
in classjavafx.application.Application
-
drawBackground
void drawBackground() -
drawGame
void drawGame() -
drawCar
void drawCar() -
handleKeyPress
void handleKeyPress(javafx.scene.input.KeyEvent e) -
handleKeyRelease
void handleKeyRelease(javafx.scene.input.KeyEvent e) -
drawTrack
void drawTrack() -
drawGameOver
void drawGameOver()
-