dao::modes

Declared in dao/GameModes.h.

Functions

OnAreaLoaded()

void OnAreaLoaded(std::function<void()> observer)

Calls observer once per load, as the loading screen goes: a save loaded, an area transition, a new game.

The area is loaded, the party stands in it where the engine placed it, and the area’s and module’s load scripts have run. The loading screen shown while the game is saved is not a load. If a load script starts a cutscene or a conversation, it comes before that plays.

OnInputBack()

void OnInputBack(std::function<void()> observer)

Calls observer when the game takes the player’s input again: explore or combat mode entered from any other, as a load, a cutscene, a conversation or a full-screen screen ends.

OnModeChanged()

void OnModeChanged(std::function<void(GameMode before, GameMode now)> observer)

Calls observer each time the game’s mode changes, once the new mode has entered.

Callbacks run on the game thread, from the controller’s update, after the module has had its EVENT_TYPE_GAMEMODE_CHANGE.

Parameter  
observer receives the mode left and the mode entered