name
name: (GameState) -> stringThe constant's name as declared.
GameState.valueOf(…)
GameState.of(…)
GameState.UNKNOWN| Method | Returns | Description |
|---|---|---|
name() | string | The constant's name as declared. |
ordinal() | number | The constant's 0-based position in values(). |
toString() | string | name(); tostring(c) answers the same. |
compareTo(GameState) | number | This ordinal less other's. |
equals(any) | boolean | Whether other is this constant. == answers the same. |
getState() | number | This constant's getState() value, listed on each constant. |
values() | {GameState} | Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it. |
valueOf(string) | GameState | valueOf(name): the constant named name; any other name is an error. |
of(number) | GameState | The constant whose getState() is state, or UNKNOWN. |
| Field | Type | Description |
|---|---|---|
UNKNOWN | GameState | UNKNOWN: ordinal 0; getState() -1. |
STARTING | GameState | STARTING: ordinal 1; getState() 0. |
LOGIN_SCREEN | GameState | LOGIN_SCREEN: ordinal 2; getState() 10. |
LOGIN_SCREEN_AUTHENTICATOR | GameState | LOGIN_SCREEN_AUTHENTICATOR: ordinal 3; getState() 11. |
LOGGING_IN | GameState | LOGGING_IN: ordinal 4; getState() 20. |
LOADING | GameState | LOADING: ordinal 5; getState() 25. |
LOGGED_IN | GameState | LOGGED_IN: ordinal 6; getState() 30. |
CONNECTION_LOST | GameState | CONNECTION_LOST: ordinal 7; getState() 40. |
HOPPING | GameState | HOPPING: ordinal 8; getState() 45. |
| Method | Returns | Description |
|---|---|---|
Client.getGameState | GameState | The game state (GameState.of of the client's value; UNKNOWN for one with no constant). |
GameStateChanged.getGameState | GameState | The new state. |
GameStateClass.of | GameState | The constant whose getState() is state, or UNKNOWN. |
GameStateClass.valueOf | GameState | valueOf(name): the constant named name; any other name is an error. |
GameStateClass.values | {GameState} | Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it. |
namename: (GameState) -> stringThe constant's name as declared.
ordinalordinal: (GameState) -> numberThe constant's 0-based position in values().
toStringtoString: (GameState) -> stringname(); tostring(c) answers the same.
compareTocompareTo: (GameState, GameState) -> numberThis ordinal less other's.
equalsequals: (GameState, any) -> booleanWhether other is this constant. == answers the same.
getStategetState: (GameState) -> numberThis constant's getState() value, listed on each constant.
valuesvalues: () -> {GameState}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.
valueOfvalueOf: (string) -> GameStatevalueOf(name): the constant named name; any other name is an error.
ofof: (number) -> GameStateThe constant whose getState() is state, or UNKNOWN.