diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-26 11:44:23 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-26 11:44:23 +0200 |
commit | 86872106dc9aa960b417b5ff7f4a175c81058411 (patch) | |
tree | e8da47396f7f7eb37efe80b559e68d84aec9e818 /src/game/game.hpp | |
parent | d04e1b48bd934f8d9d91aab13e9e51393fd7b6ba (diff) |
Add the replicator.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp index f630c54..387df1a 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -239,6 +239,10 @@ namespace game { } teleporter_assets_t; typedef struct { + render::animated_texture_t idle, working, unfinished, avatar; + } replicator_assets_t; + + typedef struct { render::animated_texture_t blood, flash, explosion, ricochet, water_splash; audio::sound_t gibbing, corpse_hit; audio::sound_t explosion_sound, ricochet_sound, water_splash_sound; @@ -265,6 +269,7 @@ namespace game { extern spider_assets_t spider; extern nest_assets_t nest; extern teleporter_assets_t teleporter; + extern replicator_assets_t replicator; extern fx_assets_t fx; extern deco_assets_t deco; extern audio::ambient_t ambients[AMBIENT_COUNT]; @@ -324,7 +329,8 @@ namespace game { UNIT_BUILDER, UNIT_SPIDER, UNIT_NEST, - UNIT_TELEPORTER + UNIT_TELEPORTER, + UNIT_REPLICATOR } type_t; game::state_t *game; @@ -413,6 +419,7 @@ namespace game { void on_death(void); void command_throw_grenade(v2f_t at); + void command_restock(bool grenades); }; class unit_scientist_t : public unit_t { @@ -518,6 +525,24 @@ namespace game { void activate(unit_t::type_t type); }; + class unit_replicator_t : public unit_t { + ntime_t last_activation = 0; + + public: + unit_replicator_t(game::state_t *game_); + ~unit_replicator_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); + + void activate(bool grenades); + }; + class effect_t : public game::entity_t { public: double ttl = +INFINITY; |