bullet.hpp 416 B

12345678910111213141516171819
  1. #ifndef _bullet_
  2. #define _bullet_
  3. #include "game_object.hpp"
  4. class bullet : public game_object
  5. {
  6. public:
  7. bullet(int X,int Y,int ID) : game_object(X,Y,ID) {} //constructor
  8. ~bullet() {}
  9. void next_pos(); //evaluates next position checking bullet's id (laser or bomb)
  10. bool operator==(bullet& other) { if(other.x==x && other.y==y && other.id==id) return true; else return false; }
  11. };
  12. #endif