Class Main
java.lang.Object
javafx.application.Application
application.Main
public class Main
extends javafx.application.Application
JavaFX entry point that controls screen navigation for PotionMixie.
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBase game height used by all screens.static final intBase game width used by all screens.Fields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidLaunches the JavaFX application.voidShows the credit screen.voidShows the game screen using the currently selected level.voidShows the how-to-play screen.voidShows the level selection screen.voidShows the main menu screen.voidstart(javafx.stage.Stage stage) Sets up the main stage and opens the main menu screen.Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
Field Details
-
GAME_WIDTH
public static final int GAME_WIDTHBase game width used by all screens.- See Also:
-
GAME_HEIGHT
public static final int GAME_HEIGHTBase game height used by all screens.- See Also:
-
-
Constructor Details
-
Main
public Main()Creates the JavaFX application entry object.
-
-
Method Details
-
start
public void start(javafx.stage.Stage stage) Sets up the main stage and opens the main menu screen.- Specified by:
startin classjavafx.application.Application- Parameters:
stage- primary JavaFX stage for the game
-
showMainMenuScreen
public void showMainMenuScreen()Shows the main menu screen. -
showGameScreen
public void showGameScreen()Shows the game screen using the currently selected level. -
showHowToPlayScreen
public void showHowToPlayScreen()Shows the how-to-play screen. -
showCreditScreen
public void showCreditScreen()Shows the credit screen. -
showLevelSelectionScreen
public void showLevelSelectionScreen()Shows the level selection screen. -
main
Launches the JavaFX application.- Parameters:
args- command line arguments from the JVM
-