Colobot
|
Lightning effect renderer. More...
#include <lightning.h>
Classes | |
struct | LightningSegment |
Public Member Functions | |
CLightning (CEngine *engine) | |
bool | Create (float sleep, float delay, float magnetic) |
Triggers lightning. | |
void | Flush () |
Removes lightning. | |
bool | GetStatus (float &sleep, float &delay, float &magnetic, float &progress) |
Gives the status of lightning. | |
bool | SetStatus (float sleep, float delay, float magnetic, float progress) |
Specifies the status of lightning. | |
bool | EventProcess (const Event &event) |
Management of an event. | |
void | Draw () |
Draws lightning. | |
Protected Types | |
enum | LightningPhase { Wait, Flash } |
Protected Member Functions | |
bool | EventFrame (const Event &event) |
Updates lightning. | |
CObject * | SearchObject (Math::Vector pos) |
Seeks for the object closest to the lightning. | |
Protected Attributes | |
CEngine * | m_engine = nullptr |
CTerrain * | m_terrain = nullptr |
CCamera * | m_camera = nullptr |
CSoundInterface * | m_sound = nullptr |
bool | m_lightningExists = false |
float | m_sleep = 0.0f |
float | m_delay = 0.0f |
float | m_magnetic = 0.0f |
float | m_speed = 0.0f |
float | m_progress = 0.0f |
Math::Vector | m_pos |
LightningPhase | m_phase = LightningPhase::Wait |
std::vector< LightningSegment > | m_segments |
Lightning effect renderer.
TODO: documentation