From cd9b7052f07291e3975bad5dcfe9ad0338c17e74 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 15 Dec 2017 15:01:38 +0100 Subject: Add tracers. --- src/game/game.hpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/game/game.hpp') 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); + }; }; -- cgit