Game Initial State.
More...
#include <InitState.hpp>
|
| InitState (NetworkManager *networkManager, ImageManager *imageManager, InputManager *inputManager, MentalMap *mentalMap, asrob::IRobotManager *robotManager, AudioManager *audioManager, ScreenManager *screenManager) |
|
virtual bool | setup () |
| Function executed just before the loop function, when the state is enabled. More...
|
|
virtual bool | loop () |
| Function executed periodically when the state is active. More...
|
|
virtual bool | cleanup () |
| Function excuted when this state is going to be stopped (due to an error or a transition) More...
|
|
virtual int | evaluateConditions () |
| This function is called after each call to loop() in order to know the transition to make. More...
|
|
virtual bool | onKeyDown (const Key &k) |
| This function will be called whenever a key is pressed on the keyboard. More...
|
|
virtual bool | onKeyUp (const Key &k) |
| This function will be called whenever a key is released on the keyboard. More...
|
|
virtual bool | onWindowEvent (const WindowEvent &event) |
| This function will be called whenever a window event is raised. More...
|
|
const std::string & | getStateId () const |
| Returns the string that identifies the state.
|
|
| ManagerHub (NetworkManager *networkManager, ImageManager *imageManager, InputManager *inputManager, MentalMap *mentalMap, asrob::IRobotManager *robotManager, AudioManager *audioManager, ScreenManager *screenManager) |
|
bool | setNetworkManager (NetworkManager *networkManager) |
|
bool | setImageManager (ImageManager *imageManager) |
|
bool | setInputManager (InputManager *inputManager) |
|
bool | setMentalMap (MentalMap *mentalMap) |
|
bool | setRobotManager (asrob::IRobotManager *robotManager) |
|
bool | setAudioManager (AudioManager *audioManager) |
|
bool | setScreenManager (ScreenManager *screenManager) |
|
|
static const int | LOGIN_SUCCESSFUL = 1 |
|
static const int | EXIT_REQUESTED = 2 |
|
|
static State * | getEndState () |
|
Behavior:
- Waits for user input (showing nice RobotDevastation screen)
- When user presses a button (Enter?), connects to the server and starts the game
- Closes if user presses Esc
- It also plays music (important)
◆ cleanup()
bool rd::InitState::cleanup |
( |
| ) |
|
|
virtual |
- Returns
- False if some problem ocurred
Implements rd::State.
◆ evaluateConditions()
int rd::InitState::evaluateConditions |
( |
| ) |
|
|
virtual |
An integer value is assigned to each possible transition to identify them.
- Returns
- Transition selected depending on the conditions of the state
Implements rd::State.
◆ loop()
bool rd::InitState::loop |
( |
| ) |
|
|
virtual |
- Returns
- False if some problem ocurred
Implements rd::State.
◆ onKeyDown()
bool rd::InitState::onKeyDown |
( |
const Key & |
k | ) |
|
|
virtual |
◆ onKeyUp()
bool rd::InitState::onKeyUp |
( |
const Key & |
k | ) |
|
|
virtual |
◆ onWindowEvent()
bool rd::InitState::onWindowEvent |
( |
const WindowEvent & |
event | ) |
|
|
virtual |
◆ setup()
bool rd::InitState::setup |
( |
| ) |
|
|
virtual |
- Returns
- False if some problem ocurred
Implements rd::State.
The documentation for this class was generated from the following files:
- src/libraries/GameStatesLib/InitState.hpp
- src/libraries/GameStatesLib/InitState.cpp