mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-22 10:34:18 +00:00
29 lines
508 B
C
29 lines
508 B
C
|
#ifndef GAME_SERVER_ENTITIES_LASER_H
|
||
|
#define GAME_SERVER_ENTITIES_LASER_H
|
||
|
|
||
|
#include <game/server/entity.h>
|
||
|
|
||
|
class CLaser : public CEntity
|
||
|
{
|
||
|
public:
|
||
|
CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner);
|
||
|
|
||
|
virtual void Reset();
|
||
|
virtual void Tick();
|
||
|
virtual void Snap(int SnappingClient);
|
||
|
|
||
|
protected:
|
||
|
bool HitCharacter(vec2 From, vec2 To);
|
||
|
void DoBounce();
|
||
|
|
||
|
private:
|
||
|
vec2 m_From;
|
||
|
vec2 m_Dir;
|
||
|
float m_Energy;
|
||
|
int m_Bounces;
|
||
|
int m_EvalTick;
|
||
|
int m_Owner;
|
||
|
};
|
||
|
|
||
|
#endif
|