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

#include <fx.h>

Public Member Functions

 Fx (const SkillTable &skills, Shader lit, const ItemTable &items={})
 ~Fx ()
 Fx (const Fx &)=delete
Fx & operator= (const Fx &)=delete
void Update (const std::vector< Figure > &figures, float seconds)
void Hold (std::vector< Figure > &figures) const
void DrawSolid (const Terrain &terrain) const
 The shards and the spikes.
void DrawGhosts (const Characters &characters) const
 The copies fast moves leave behind them, which go over what's solid.
void DrawLight (const Camera3D &camera, const Terrain &terrain, const Atmosphere &atmosphere, const Characters &characters) const
 The light, which goes over what's behind it, and blooms.
Vector3 Shake (Vector3 camera) const
 How far the camera's shaken, at this moment, by the skills near it.
float Zoom () const
 How far in our own camera goes, in metres, for a skill we're using.
std::size_t casts () const
 How many skills' fx are going.

Static Public Attributes

static constexpr float kStill = 0.05f
static constexpr float kCatchUp = 1.5f
static constexpr float kGhostGap = 0.05f
 How far apart the copies a fast move leaves are, in seconds.

Detailed Description

What the skills show besides the players' moves: their fx. Each is worked out from how long ago the skill started, so it looks the same at any frame rate.

Definition at line 27 of file fx.h.

Constructor & Destructor Documentation

◆ Fx() [1/2]

nanommo::Fx::Fx ( const SkillTable & skills,
Shader lit,
const ItemTable & items = {} )

The shards and the spikes are solid, lit by the world's shader. A swing lands when the weapon in the hand says, from the items.

Definition at line 172 of file fx.cc.

◆ ~Fx()

nanommo::Fx::~Fx ( )

Definition at line 194 of file fx.cc.

◆ Fx() [2/2]

nanommo::Fx::Fx ( const Fx & )
delete

Member Function Documentation

◆ casts()

std::size_t nanommo::Fx::casts ( ) const
inline

How many skills' fx are going.

Definition at line 70 of file fx.h.

◆ DrawGhosts()

void nanommo::Fx::DrawGhosts ( const Characters & characters) const

The copies fast moves leave behind them, which go over what's solid.

Definition at line 685 of file fx.cc.

◆ DrawLight()

void nanommo::Fx::DrawLight ( const Camera3D & camera,
const Terrain & terrain,
const Atmosphere & atmosphere,
const Characters & characters ) const

The light, which goes over what's behind it, and blooms.

Definition at line 825 of file fx.cc.

◆ DrawSolid()

void nanommo::Fx::DrawSolid ( const Terrain & terrain) const

The shards and the spikes.

Definition at line 739 of file fx.cc.

◆ Hold()

void nanommo::Fx::Hold ( std::vector< Figure > & figures) const

Holds the players back where a blow of theirs has just landed, and what it landed on with them, for the weight of the hit.

Definition at line 341 of file fx.cc.

◆ operator=()

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

◆ Shake()

Vector3 nanommo::Fx::Shake ( Vector3 camera) const

How far the camera's shaken, at this moment, by the skills near it.

Definition at line 936 of file fx.cc.

◆ Update()

void nanommo::Fx::Update ( const std::vector< Figure > & figures,
float seconds )

Follows the skills the players are using, and keeps each going until its fx are over, as a ring spreads on after the move's done.

Definition at line 199 of file fx.cc.

◆ Zoom()

float nanommo::Fx::Zoom ( ) const

How far in our own camera goes, in metres, for a skill we're using.

Definition at line 960 of file fx.cc.

Member Data Documentation

◆ kCatchUp

float nanommo::Fx::kCatchUp = 1.5f
staticconstexpr

Definition at line 32 of file fx.h.

◆ kGhostGap

float nanommo::Fx::kGhostGap = 0.05f
staticconstexpr

How far apart the copies a fast move leaves are, in seconds.

Definition at line 34 of file fx.h.

◆ kStill

float nanommo::Fx::kStill = 0.05f
staticconstexpr

While a blow that's landed holds things still, they go at this share of their speed, and then catch up, faster, over this many times as long.

Definition at line 31 of file fx.h.


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