nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Loading Class Reference

#include <loading.h>

Public Member Functions

void Cover ()
 Covers the world from the next frame on.
bool covered () const
bool covering () const
 Whether the cover's up, or going up.
void Lift ()
 The land is built, so the cover fades and the fog lifts.
void Update (float seconds)
 Moves on by the frame's time, once the frame is drawn.
float cover () const
 How much of the screen the cover hides, from 0 to 1.
float clear () const

Static Public Attributes

static constexpr float kFade = 0.4f
 In seconds.
static constexpr float kLift = 1.5f

Detailed Description

When a screen covers the world, while the world isn't there yet, kept apart from raylib and ImGui so that it can be tested without a window. It covers the world from the moment we enter one, or go into a new land, until the land is built. Then it fades, and the fog lifts off the land, nearest first, so that the land comes out of its sky instead of appearing at once.

Definition at line 14 of file loading.h.

Member Function Documentation

◆ clear()

float nanommo::Loading::clear ( ) const

How far the fog has lifted, from 0, where it hides all but what's nearest, to 1, the land's own fog.

Definition at line 70 of file loading.cc.

◆ Cover()

void nanommo::Loading::Cover ( )

Covers the world from the next frame on.

Definition at line 28 of file loading.cc.

◆ cover()

float nanommo::Loading::cover ( ) const

How much of the screen the cover hides, from 0 to 1.

Definition at line 57 of file loading.cc.

◆ covered()

bool nanommo::Loading::covered ( ) const
inline

Whether the last frame drawn was covered, so that a land built now, which holds up the next frame, is built behind the cover.

Definition at line 25 of file loading.h.

◆ covering()

bool nanommo::Loading::covering ( ) const
inline

Whether the cover's up, or going up.

Definition at line 28 of file loading.h.

◆ Lift()

void nanommo::Loading::Lift ( )

The land is built, so the cover fades and the fog lifts.

Definition at line 35 of file loading.cc.

◆ Update()

void nanommo::Loading::Update ( float seconds)

Moves on by the frame's time, once the frame is drawn.

Definition at line 40 of file loading.cc.

Member Data Documentation

◆ kFade

float nanommo::Loading::kFade = 0.4f
staticconstexpr

In seconds.

Definition at line 17 of file loading.h.

◆ kLift

float nanommo::Loading::kLift = 1.5f
staticconstexpr

Definition at line 18 of file loading.h.


The documentation for this class was generated from the following files: