diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-15 15:01:38 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-15 15:01:38 +0100 |
commit | cd9b7052f07291e3975bad5dcfe9ad0338c17e74 (patch) | |
tree | 532e33fe82f6335ae63c51e461c1814363c711a6 /src/game/game.hpp | |
parent | e91ce36233474222e39ac2732100963fcb55574a (diff) |
Add tracers.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp index a952576..0a1d0ca 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -2,7 +2,8 @@ namespace game { enum { - ET_UNIT + ET_UNIT, + ET_EFFECT }; enum { @@ -119,7 +120,7 @@ namespace game { v2f_t last_target_x; public: - human_t(game::state_t *game); + human_t(game::state_t *game_); void render_to(render::state_t *render); void wake(unit_t *by_whom); @@ -132,7 +133,7 @@ namespace game { double next_targetting = -INFINITY; public: - alien_t(game::state_t *game); + alien_t(game::state_t *game_); void render_to(render::state_t *render); void wake(unit_t *by_whom); @@ -140,4 +141,20 @@ namespace game { void think(void); void die(void); }; + + class effect_t : public world::entity_t { + public: + game::state_t *game; + + double ttl = +INFINITY; + effect_t(game::state_t *game_); + }; + + class fx_tracer_t : public effect_t { + v2f_t x0, x1; + + public: + fx_tracer_t(game::state_t *game_, v2f_t x0_, v2f_t x1_); + void render_to(render::state_t *render); + }; }; |