62 bool Create(
float sleep,
float delay,
float magnetic);
68 bool GetStatus(
float &sleep,
float &delay,
float &magnetic,
float &progress);
70 bool SetStatus(
float sleep,
float delay,
float magnetic,
float progress);
93 bool m_lightningExists =
false;
96 float m_magnetic = 0.0f;
99 float m_progress = 0.0f;
102 enum class LightningPhase
107 LightningPhase m_phase = LightningPhase::Wait;
114 std::vector<LightningSegment> m_segments;
void Flush()
Removes lightning.
Definition: lightning.cpp:65
Point struct and related functions.
void StrikeAtPos(Math::Vector pos)
Shoots lightning strike at given position.
Definition: lightning.cpp:355
bool GetStatus(float &sleep, float &delay, float &magnetic, float &progress)
Gives the status of lightning.
Definition: lightning.cpp:193
Lightning effect renderer.
Definition: lightning.h:55
Definition: lightning.h:109
2D point
Definition: point.h:50
Camera moving in 3D scene.
Definition: camera.h:128
const float LTNG_PROTECTION_RADIUS
Radius of lightning protection.
Definition: lightning.h:46
Terrain loader/generator and manager.
Definition: terrain.h:147
bool EventFrame(const Event &event)
Updates lightning.
Definition: lightning.cpp:83
Namespace for (new) graphics code.
Definition: app.h:49
void Draw()
Draws lightning.
Definition: lightning.cpp:219
Vector struct and related functions.
The graphics engine.
Definition: engine.h:585
CObject * SearchObject(Math::Vector pos)
Seeks for the object closest to the lightning.
Definition: lightning.cpp:298
3D (3x1) vector
Definition: vector.h:53
Event sent by system, interface or game.
Definition: event.h:735
Base class for all 3D in-game objects.
Definition: object.h:63
bool SetStatus(float sleep, float delay, float magnetic, float progress)
Specifies the status of lightning.
Definition: lightning.cpp:205
bool EventProcess(const Event &event)
Management of an event.
Definition: lightning.cpp:75
Sound plugin interface.
Definition: sound.h:60
bool Create(float sleep, float delay, float magnetic)
Triggers lightning.
Definition: lightning.cpp:178