|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <jukebox.h>
Public Types | |
| enum class | Cue { kNothing , kStart , kStop } |
| What the track should do this frame. More... | |
Public Member Functions | |
| Cue | Update (float seconds, bool in_world, bool playing) |
| float | volume () const |
| From nothing to the track's full volume. | |
Static Public Attributes | |
| static constexpr float | kFadeIn = 3.0f |
| In seconds. | |
| static constexpr float | kFadeOut = 1.5f |
| static constexpr float | kRest = 45.0f |
When the music plays, and how loud, kept apart from raylib so that it can be tested without a sound card. The music fades in as the player enters the world, plays the track through, rests for a while in silence and plays it again, and it fades out as they leave.
|
strong |
| Jukebox::Cue nanommo::Jukebox::Update | ( | float | seconds, |
| bool | in_world, | ||
| bool | playing ) |
Moves on by the frame's time, from whether the player is in the world, and whether the track is playing.
Definition at line 7 of file jukebox.cc.
|
inline |
|
staticconstexpr |