|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#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. | |
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.
| nanommo::Weather::Weather | ( | ) |
Definition at line 310 of file weather.cc.
| nanommo::Weather::~Weather | ( | ) |
Definition at line 312 of file weather.cc.
|
delete |
| 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.
| 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.
| 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.
|
inline |
|
inline |
| std::vector< Bolt > nanommo::Weather::TakeBolts | ( | ) |
The bolts that struck since the last time, once each.
Definition at line 402 of file weather.cc.
| 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.
|
inline |