1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00
Aquaria/Aquaria/Beam.h
fgenesis 68b3c61852 Add RenderState to be passed through the scene graph
This will eventually handle all mutable state during rendering
2022-05-20 01:04:19 +02:00

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