summaryrefslogtreecommitdiff
path: root/src/game/game.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r--src/game/game.hpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index 2a472b7..bc9c249 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -205,6 +205,8 @@ namespace game {
render::oriented_sprite_4M_t body_idle, body_walking;
render::oriented_sprite_4M_t head_idle;
render::animated_texture_t avatar;
+
+ audio::sound_t laugh, gather;
} scientist_assets_t;
typedef struct {
@@ -382,16 +384,17 @@ namespace game {
};
class unit_scientist_t : public unit_t {
+ ntime_t last_laugh = 0;
+
public:
std::unique_ptr<fx_move_marker_t> move_marker;
- std::unique_ptr<fx_aim_marker_t> aim_marker;
+ std::unique_ptr<fx_aim_marker_t> gather_marker;
sf::Color selection_color;
- void check_area(void);
- void shoot(v2f_t from, v2f_t at, int damage);
- void fire_shotgun(v2f_t aim);
- void target_and_attack(void);
+ bool gathering = false, gathered;
+ v2f_t gathering_at;
+ void gather_crystals(void);
unit_scientist_t(game::state_t *game_);
~unit_scientist_t(void) {};
@@ -399,9 +402,9 @@ namespace game {
void render_late_to(render::state_t *render);
void on_think(void);
- void on_spawn(void) {};
+ void on_spawn(void);
void on_wake(void) {};
- void on_damage(unit_t *attacker);
+ void on_damage(unit_t *attacker) {};
void on_death(void);
};
@@ -569,9 +572,9 @@ namespace game {
} deco_type_t;
class deco_t : public game::entity_t {
+ public:
deco_type_t type;
- public:
double phase_shift;
deco_t(game::state_t *game, deco_type_t type_);