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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Base game height used by all screens.
    static final int
    Base game width used by all screens.

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the JavaFX application entry object.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Launches the JavaFX application.
    void
    Shows the credit screen.
    void
    Shows the game screen using the currently selected level.
    void
    Shows the how-to-play screen.
    void
    Shows the level selection screen.
    void
    Shows the main menu screen.
    void
    start(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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GAME_WIDTH

      public static final int GAME_WIDTH
      Base game width used by all screens.
      See Also:
    • GAME_HEIGHT

      public static final int GAME_HEIGHT
      Base 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:
      start in class javafx.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

      public static void main(String[] args)
      Launches the JavaFX application.
      Parameters:
      args - command line arguments from the JVM