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

#include <weather.h>

Public Member Functions

 Weather ()
 ~Weather ()
 Weather (const Weather &)=delete
Weather & operator= (const Weather &)=delete
void set_land (const Terrain &terrain, int land)
void set_seed (uint32_t seed)
void set_wetness (float wetness)
void Update (float seconds, const protocol::Sky &sky, bool on, const Camera3D &camera)
void Draw (const Camera3D &camera, const Atmosphere &atmosphere) const
float wetness () const
 From dry to soaked, which rain makes it, and the sun dries.
float flash () const
 How bright the sky is from a bolt that's just struck, from 0 to 1.
std::vector< Bolt > TakeBolts ()
 The bolts that struck since the last time, once each.

Detailed Description

What the sky lets fall, what glows in the dark, and the lightning, drawn around the camera from the sky the server sent. Each drop, flake and ember is worked out from the clock alone, where it is in its fall, so nothing is kept for any of them between frames.

Definition at line 25 of file weather.h.

Constructor & Destructor Documentation

◆ Weather() [1/2]

nanommo::Weather::Weather ( )

Definition at line 310 of file weather.cc.

◆ ~Weather()

nanommo::Weather::~Weather ( )

Definition at line 312 of file weather.cc.

◆ Weather() [2/2]

nanommo::Weather::Weather ( const Weather & )
delete

Member Function Documentation

◆ Draw()

void nanommo::Weather::Draw ( const Camera3D & camera,
const Atmosphere & atmosphere ) const

Inside BeginMode3D, after what's solid and the sea, as it's all see-through.

Definition at line 404 of file weather.cc.

◆ flash()

float nanommo::Weather::flash ( ) const

How bright the sky is from a bolt that's just struck, from 0 to 1.

Definition at line 400 of file weather.cc.

◆ operator=()

Weather & nanommo::Weather::operator= ( const Weather & )
delete

◆ set_land()

void nanommo::Weather::set_land ( const Terrain & terrain,
int land )

The land's ground, which what falls lands on, and its place in the lands, which says what falls there and what glows.

Definition at line 314 of file weather.cc.

◆ set_seed()

void nanommo::Weather::set_seed ( uint32_t seed)
inline

Where the lightning strikes and how often comes from this, so that a film's bolts strike where they did the last time.

Definition at line 39 of file weather.h.

◆ set_wetness()

void nanommo::Weather::set_wetness ( float wetness)
inline

As soaked as this to start with, rather than as wet as the weather would make it: for a film that starts after the rain.

Definition at line 43 of file weather.h.

◆ TakeBolts()

std::vector< Bolt > nanommo::Weather::TakeBolts ( )

The bolts that struck since the last time, once each.

Definition at line 402 of file weather.cc.

◆ Update()

void nanommo::Weather::Update ( float seconds,
const protocol::Sky & sky,
bool on,
const Camera3D & camera )

Moves on by the seconds, under the sky, around the camera. Off, nothing falls or glows, and the ground dries.

Definition at line 319 of file weather.cc.

◆ wetness()

float nanommo::Weather::wetness ( ) const
inline

From dry to soaked, which rain makes it, and the sun dries.

Definition at line 55 of file weather.h.


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