|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <reactions.h>
Public Member Functions | |
| void | Hit (uint32_t monster, uint32_t player) |
| The player hit the monster, both by their ids. | |
| void | Update (float seconds) |
| Moves each blow's reaction on. | |
| void | Apply (std::vector< Figure > &figures) |
| Lights up, rocks and tips the monsters, as their blows have them now. | |
Static Public Attributes | |
| static constexpr float | kFlashTime = 0.15f |
| How long a flash takes to fade, in seconds. | |
| static constexpr float | kRock = 0.3f |
| static constexpr float | kRockIn = 0.03f |
| static constexpr float | kRockOut = 0.12f |
| static constexpr float | kTumble = 0.6f |
| How far over a monster in the air tips, in radians, for each metre up. | |
| static constexpr float | kHeld = 2.0f |
How the monsters take the blows that land on them: each lights up, and rocks back away from whoever hit it, and one thrown up tumbles as it goes.
Definition at line 14 of file reactions.h.
| void nanommo::Reactions::Apply | ( | std::vector< Figure > & | figures | ) |
Lights up, rocks and tips the monsters, as their blows have them now.
Definition at line 23 of file reactions.cc.
| void nanommo::Reactions::Hit | ( | uint32_t | monster, |
| uint32_t | player ) |
The player hit the monster, both by their ids.
Definition at line 10 of file reactions.cc.
| void nanommo::Reactions::Update | ( | float | seconds | ) |
Moves each blow's reaction on.
Definition at line 14 of file reactions.cc.
|
staticconstexpr |
How long a flash takes to fade, in seconds.
Definition at line 17 of file reactions.h.
|
staticconstexpr |
How long a blow's kept, in seconds: long enough for a monster it threw up to come down again, tipped the way it sent it.
Definition at line 27 of file reactions.h.
|
staticconstexpr |
How far a blow rocks a monster back at most, in radians, and how fast it gets there and comes back.
Definition at line 20 of file reactions.h.
|
staticconstexpr |
Definition at line 21 of file reactions.h.
|
staticconstexpr |
Definition at line 22 of file reactions.h.
|
staticconstexpr |
How far over a monster in the air tips, in radians, for each metre up.
Definition at line 24 of file reactions.h.