diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-14 18:25:44 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-14 18:25:44 +0000 |
| commit | a420eb543f8206730aebb80e60a625f7204694e4 (patch) | |
| tree | 235971d38c917c1b97c512743db64c2fd23ffadc /src/game/server/entities/laser.hpp | |
| parent | 817f431377c7f1545621ff597c018b133651e991 (diff) | |
| download | zcatch-a420eb543f8206730aebb80e60a625f7204694e4.tar.gz zcatch-a420eb543f8206730aebb80e60a625f7204694e4.zip | |
moved alot of stuff to their own cpp/hpp files
Diffstat (limited to 'src/game/server/entities/laser.hpp')
| -rw-r--r-- | src/game/server/entities/laser.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/game/server/entities/laser.hpp b/src/game/server/entities/laser.hpp new file mode 100644 index 00000000..4842b3f8 --- /dev/null +++ b/src/game/server/entities/laser.hpp @@ -0,0 +1,31 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ + +#ifndef GAME_SERVER_ENTITY_LASER_H +#define GAME_SERVER_ENTITY_LASER_H + +#include <game/server/entity.hpp> + +class CHARACTER; + +class LASER : public ENTITY +{ + vec2 from; + vec2 dir; + float energy; + int bounces; + int eval_tick; + CHARACTER *owner; + + bool hit_character(vec2 from, vec2 to); + void do_bounce(); + +public: + + LASER(vec2 pos, vec2 direction, float start_energy, CHARACTER *owner); + + virtual void reset(); + virtual void tick(); + virtual void snap(int snapping_client); +}; + +#endif |