|
SpaceNLasers
|
Abstraction of a display for scores and stuff. More...


Public Member Functions | |
| def | __init__ (self, targetHostname) |
| Initialises state and sends player information to display. More... | |
| def | CheckNewGameStart (self) |
| Check if new game start is available. More... | |
| def | SendNewGameStart (self, msg) |
| Send gamestart. More... | |
| def | SendGameInfo (self, info) |
| Send game info (scores). More... | |
| def | SendError (self, error) |
| Send error message to menu god. More... | |
| def | GameOver (self) |
| Send game over message. More... | |
Public Attributes | |
| state | |
| buffer | |
| server | |
| connection | |
| targetHostname | |
Static Public Attributes | |
| float | CONNECTION_TIMEOUT = 0.1 |
| Time to try to establish a new connection. More... | |
Abstraction of a display for scores and stuff.
Usage
During game
| def lib.MenuGod.MenuGod.__init__ | ( | self, | |
| targetHostname | |||
| ) |
Initialises state and sends player information to display.
| targetHostname | IP of server to connect to. Use empty string to use server-mode |
| def lib.MenuGod.MenuGod.CheckNewGameStart | ( | self | ) |
Check if new game start is available.
If yes, MenuGod goes to game mode
| def lib.MenuGod.MenuGod.GameOver | ( | self | ) |
Send game over message.
After this, no more messages should be sent!
| def lib.MenuGod.MenuGod.SendError | ( | self, | |
| error | |||
| ) |
Send error message to menu god.
| def lib.MenuGod.MenuGod.SendGameInfo | ( | self, | |
| info | |||
| ) |
Send game info (scores).
Raises AbortGameException if data received
| def lib.MenuGod.MenuGod.SendNewGameStart | ( | self, | |
| msg | |||
| ) |
Send gamestart.
Only used for beamer
| lib.MenuGod.MenuGod.buffer |
| lib.MenuGod.MenuGod.connection |
|
static |
Time to try to establish a new connection.
| lib.MenuGod.MenuGod.server |
| lib.MenuGod.MenuGod.state |
| lib.MenuGod.MenuGod.targetHostname |
1.8.9.1