|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <death_screen.h>
Public Member Functions | |
| void | Update (float seconds, bool dead) |
| Moves on by the frame's time, from whether the player's dead. | |
| float | dark () const |
| How dark the world is, from 0 to 1. | |
| bool | Build (bool dead, uint32_t wait_ms) const |
Static Public Attributes | |
| static constexpr float | kDim = 0.6f |
| How dark the world gets while they're dead, from 0 to 1. | |
| static constexpr float | kDarken = 1.0f |
| In seconds: how long the world takes to darken, and to come back. | |
| static constexpr float | kReturn = 0.8f |
What the player sees while they're dead: the world darkens, and a window in the middle counts down to when they can come back, then lets them, with a click. As they come back, in the middle of the land, the screen goes dark and the world fades back in, so that they don't jump there.
Definition at line 12 of file death_screen.h.
| bool nanommo::DeathScreen::Build | ( | bool | dead, |
| uint32_t | wait_ms ) const |
Darkens the world, and while the player's dead, draws the window, with how long they have to wait, in milliseconds. Returns true once they ask to come back.
Definition at line 37 of file death_screen.cc.
|
inline |
How dark the world is, from 0 to 1.
Definition at line 24 of file death_screen.h.
| void nanommo::DeathScreen::Update | ( | float | seconds, |
| bool | dead ) |
Moves on by the frame's time, from whether the player's dead.
Definition at line 24 of file death_screen.cc.
|
staticconstexpr |
In seconds: how long the world takes to darken, and to come back.
Definition at line 17 of file death_screen.h.
|
staticconstexpr |
How dark the world gets while they're dead, from 0 to 1.
Definition at line 15 of file death_screen.h.
|
staticconstexpr |
Definition at line 18 of file death_screen.h.