12345678910111213141516171819202122232425262728 |
- //
- // Created by jovian on 18/07/17.
- //
- #ifndef TINYSHOOTER_BULLET_H
- #define TINYSHOOTER_BULLET_H
- #include "Entity.h"
- class Bullet : public Entity {
- public :
- Bullet(const b2Vec2 &pos, b2World* physics, const b2Vec2 &dir, const b2Vec2 &speed, unsigned int camp);
- void update() override;
- int getDamage() const;
- protected:
- float m_damageScale; // Damage multiplier on impact
- unsigned int m_timeLife; // Number of ticks before dying
- unsigned int m_camp; // The camp of the shooter
- const float m_aero;
- b2Vec2 m_dir; // The direction of the missile
- };
- #endif //TINYSHOOTER_BULLET_H
|