// // Created by jovian on 18/07/17. // #ifndef TINYSHOOTER_SOLDIER_H #define TINYSHOOTER_SOLDIER_H #include "Entity.h" #include "Bullet.h" #include "TinyWorld.h" #include "../Control/Controller.h" class Soldier : public Entity { public: Soldier(Faction faction, Controller *ctrl, TinyWorld* tinyWorld, unsigned int imgId, unsigned int camp, unsigned int life = 100); void shoot(const b2Vec2 &dir); virtual void update(); void createPhysicalShape(b2Vec2 spawn = b2Vec2_zero); protected: Controller *m_ctrl; // Decision interface unsigned int m_camp; // 0 : ally, 1 : foe unsigned int m_life; // alive if above 0 TinyWorld* m_tinyWorld; // Allows shooting (And allows AI to take decisions) b2Fixture* m_homeFixture; // Allows bullet determination in contacts // Movements float m_forceXScale; float m_forceYScale; b2Vec2 m_jumpVec; float m_jumpVelocityLimit; // Weapon unsigned int m_cool; const unsigned int m_coolCeil; }; #endif //TINYSHOOTER_SOLDIER_H