Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## state
Class GameState

    java.lang.Object
      state.GameState

All Implemented Interfaces:
  java.io.Serializable

    public class GameState

extends java.lang.Object
implements java.io.Serializable

This class manages various game states of the game

Author:
  Frank Bruns
See Also:
  Serialized Form

Field Summary
`static int` | `CUTSCENE` game state to signal running of cutscene
`static int` | `DIALOG` game state when running a dialog
`static int` | `DIALOG_SELECTION` state when showing the question selection area
`static int` | `NO_INPUT_PROCESSING` game state to signal that no user will be processed
`static int` | `NORMAL` the normal game mode
`static int` | `TRANSITION_FROM_CUTSCENE` game state to describe that a cutscene will start the next frame.
`static int` | `WALKING_TO_DIALOG` state to signal the player is walking to a dialog

Constructor Summary
`GameState()`

Method Summary
`static boolean` | `equals(int state)` Determins whether the current gamestate is equal to the specified one
`static int` | `getState()` Returns the current set game state
`static void` | `setState(int state)` Sets the current game state to the specified parameter, for example GameState.DIALOG

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NORMAL

    public static final int NORMAL

  the normal game mode

  See Also:
    Constant Field Values

### WALKING_TO_DIALOG

    public static final int WALKING_TO_DIALOG

  state to signal the player is walking to a dialog

  See Also:
    Constant Field Values

### DIALOG_SELECTION

    public static final int DIALOG_SELECTION

  state when showing the question selection area

  See Also:
    Constant Field Values

### DIALOG

    public static final int DIALOG

  game state when running a dialog

  See Also:
    Constant Field Values

### NO_INPUT_PROCESSING

    public static final int NO_INPUT_PROCESSING

  game state to signal that no user will be processed

  See Also:
    Constant Field Values

### CUTSCENE

    public static final int CUTSCENE

  game state to signal running of cutscene

  See Also:
    Constant Field Values

### TRANSITION_FROM_CUTSCENE

    public static final int TRANSITION_FROM_CUTSCENE

  game state to describe that a cutscene will start the next frame. In this gamestate only a black screen should be drawn

  See Also:
    Constant Field Values

Constructor Detail

### GameState

    public GameState()

Method Detail

### setState

    public static void setState(int state)

  Sets the current game state to the specified parameter, for example GameState.DIALOG

  Parameters:
    `state` - new game state

### getState

    public static int getState()

  Returns the current set game state

  Returns:
    current game state that is set

### equals

    public static boolean equals(int state)

  Determins whether the current gamestate is equal to the specified one

  Parameters:
    `state` - the state to compare for equality
  Returns:
    is state equal to current state? --> true=yes, false=no

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD