diff options
Diffstat (limited to 'src/game/base/projectile.h')
-rw-r--r-- | src/game/base/projectile.h | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/src/game/base/projectile.h b/src/game/base/projectile.h index bbaea99..238de6a 100644 --- a/src/game/base/projectile.h +++ b/src/game/base/projectile.h @@ -17,17 +17,52 @@ class Projectile : public core::EntityDynamic public: Projectile(unsigned long lifespan); virtual ~Projectile(); - + virtual void upkeep(const unsigned long timestamp); - + virtual void collision(Entity *other); virtual void frame(const unsigned long elapsed); + /* --- inspectors ------------------------------------------ */ + + inline const unsigned long timestamp() const + { + return projectile_timestamp; + } + + /** + * @brief the lifespan of this projectile, in milliseconds + * */ + inline const unsigned long lifespan() const + { + return projectile_lifespan; + } + + /** + * @brief the amount of damage this projectile inflicts + * */ + inline const float damage() const + { + return projectile_damage; + } + + /* --- mutators -------------------------------------------- */ + + /** + * @brief set the amount of damage this projectile inflicts + * */ + inline void set_damage(const float damage) + { + projectile_damage = damage; + } + private: unsigned long projectile_timestamp; unsigned long projectile_lifespan; + + float projectile_damage; }; } // namespace game |