12345678910111213141516171819 |
- #ifndef _bullet_
- #define _bullet_
- #include "game_object.hpp"
- class bullet : public game_object
- {
-
- public:
- bullet(int X,int Y,int ID) : game_object(X,Y,ID) {} //constructor
- ~bullet() {}
-
- void next_pos(); //evaluates next position checking bullet's id (laser or bomb)
-
- bool operator==(bullet& other) { if(other.x==x && other.y==y && other.id==id) return true; else return false; }
-
- };
- #endif
|