Package rekit.logic

Enum Class Model.GameState

java.lang.Object
java.lang.Enum<Model.GameState>
rekit.logic.Model.GameState
All Implemented Interfaces:
Serializable, Comparable<Model.GameState>, Constable
Enclosing interface:
Model

public static enum Model.GameState extends Enum<Model.GameState>
This enum defines the different states of the game.
Author:
Dominik Fuchss
  • Enum Constant Details

    • INGAME

      public static final Model.GameState INGAME
      This state indicates that currently a level is shown by the game.
    • INGAME_PAUSED

      public static final Model.GameState INGAME_PAUSED
      This state indicates that currently a level is shown by the game and it is paused. So a pause menu might be drawn.
    • INGAME_END

      public static final Model.GameState INGAME_END
      This state indicates that currently a level is show by the game and it has ended. So a end menu might be drawn.
  • Method Details

    • values

      public static Model.GameState[] 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 Model.GameState 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
    • calcState

      public Model.GameState calcState(GameModel model)
      Calculate the real Model.GameState based on GameTime and Level data.
      Parameters:
      model - the model
      Returns:
      the real gamestate