summaryrefslogtreecommitdiff
path: root/src/game/game.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-14 18:40:11 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-14 18:40:11 +0100
commitb914d67b4e683c2d3e43c1854d6ef48b1878e4b6 (patch)
treeb91f8e74db15f597b3c86b2f86f16062eeffdf1f /src/game/game.hpp
parent2bae146672c49e8d9c3a514119c6980eef6f9f86 (diff)
Allow humans to shoot.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r--src/game/game.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index fdb2348..d4aed5d 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -25,12 +25,14 @@ namespace game {
namespace assets {
typedef struct {
render::oriented_sprite_4M_t head_idle, body_idle;
+ render::oriented_sprite_4M_t body_aiming, body_firing;
render::oriented_sprite_4M2_t legs_idle, legs_walking;
render::animated_texture_t dead;
} human_assets_t;
typedef struct {
render::oriented_sprite_4M_t idle, walking;
+ render::animated_texture_t dead;
} alien_assets_t;
extern human_assets_t human;
@@ -102,6 +104,11 @@ namespace game {
};
class human_t : public unit_t {
+ double next_targetting = -INFINITY;
+ double last_target_time = -INFINITY;
+ v2f_t last_target_x;
+ double last_attack = -INFINITY;
+
public:
human_t(game::state_t *game);
void render_to(render::state_t *render);