Bullet.h 546 B

123456789101112131415161718192021222324252627
  1. //
  2. // Created by jovian on 18/07/17.
  3. //
  4. #ifndef TINYSHOOTER_BULLET_H
  5. #define TINYSHOOTER_BULLET_H
  6. #include "Entity.h"
  7. class Bullet : public Entity {
  8. public :
  9. Bullet(const b2Vec2 &pos, b2World* physics, const b2Vec2 &dir, unsigned int camp);
  10. void update() override;
  11. int getDamage() const;
  12. protected:
  13. float m_damageScale; // Damage multiplier on impact
  14. unsigned int m_timeLife; // Number of ticks before dying
  15. unsigned int m_camp; // The camp of the shooter
  16. const float m_aero;
  17. };
  18. #endif //TINYSHOOTER_BULLET_H