diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-22 17:37:38 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-22 17:37:38 +0200 |
commit | 87422cff1507f8b5a8633eee5dadbadfef872dab (patch) | |
tree | 19335fc72bde60efd41c9f87f3b8f44b153af5a4 /src/game/game.hpp | |
parent | 478c6d955abc27024599aefbf483f55efe39da55 (diff) |
Add the builder.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp index bc9c249..e48e2a3 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -210,6 +210,12 @@ namespace game { } scientist_assets_t; typedef struct { + render::oriented_sprite_4M_t head_idle, body_idle; + render::animated_texture_t dead, gibbing; + render::animated_texture_t avatar; + } builder_assets_t; + + typedef struct { render::oriented_sprite_4M_t idle, walking; render::animated_texture_t dead; @@ -242,6 +248,7 @@ namespace game { extern soldier_assets_t soldier; extern scientist_assets_t scientist; + extern builder_assets_t builder; extern spider_assets_t spider; extern nest_assets_t nest; extern repl_assets_t repl; @@ -295,6 +302,7 @@ namespace game { typedef enum { UNIT_SOLDIER, UNIT_SCIENTIST, + UNIT_BUILDER, UNIT_SPIDER, UNIT_NEST, UNIT_REPL @@ -408,6 +416,26 @@ namespace game { void on_death(void); }; + class unit_builder_t : public unit_t { + bool gibbed = false; + + public: + std::unique_ptr<fx_move_marker_t> move_marker; + + sf::Color selection_color; + + unit_builder_t(game::state_t *game_); + ~unit_builder_t(void) {}; + void render_to(render::state_t *render); + void render_late_to(render::state_t *render); + + void on_think(void); + void on_spawn(void) {}; + void on_wake(void) {}; + void on_damage(unit_t *attacker); + void on_death(void); + }; + class unit_spider_t : public unit_t { public: unit_spider_t(game::state_t *game_); |