Enum Class Stages

java.lang.Object
java.lang.Enum<Stages>
tech.underoaks.coldcase.stages.Stages
All Implemented Interfaces:
Serializable, Comparable<Stages>, Constable

public enum Stages extends Enum<Stages>
Enum representing the different stages/screens in the game. Each stage is responsible for creating the appropriate screen when requested.
  • Enum Constant Details

    • GAME

      public static final Stages GAME
      The game stage where the actual gameplay occurs. It takes a level parameter to load the appropriate game level. if none is provided it will load Level_01
    • JOIN

      public static final Stages JOIN
      This stage is responsible to connect to a remotely initialized instance
    • HOST

      public static final Stages HOST
      This stage is responsible to request a new game instance on the server
    • SETTINGS

      public static final Stages SETTINGS
      Settings
  • Method Details

    • values

      public static Stages[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Stages valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getScreen

      public abstract AbstractStage getScreen(Object... params)
      Abstract method that returns the corresponding screen for the stage. Each stage must implement this method to return the appropriate screen based on the parameters.
      Parameters:
      params - The parameters to configure the screen.
      Returns:
      The screen corresponding to the stage.