mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-29 03:33:48 +00:00
68b3c61852
This will eventually handle all mutable state during rendering
35 lines
565 B
C++
35 lines
565 B
C++
#ifndef AQUARIA_BEAM_H
|
|
#define AQUARIA_BEAM_H
|
|
|
|
#include "Quad.h"
|
|
#include "Damage.h"
|
|
|
|
#include <list>
|
|
|
|
class Entity;
|
|
|
|
class Beam : public Quad
|
|
{
|
|
public:
|
|
Beam(Vector pos, float angle);
|
|
typedef std::list<Beam*> Beams;
|
|
static Beams beams;
|
|
|
|
static void killAllBeams();
|
|
|
|
float angle;
|
|
void trace();
|
|
Vector endPos;
|
|
DamageData damageData;
|
|
|
|
void setDamage(float dmg);
|
|
void setFirer(Entity *e);
|
|
void setBeamWidth(float w);
|
|
protected:
|
|
float beamWidth;
|
|
void onRender(const RenderState& rs) const OVERRIDE;
|
|
void onEndOfLife();
|
|
void onUpdate(float dt);
|
|
};
|
|
|
|
#endif
|