123456789101112131415161718192021222324252627 |
- /* This file is part of Invaders.
- *
- * Copyright (C) 2020 LCM.
- * You may use, distribute and modify Invaders under the terms of the
- * GPLv3 license, available at <https://www.gnu.org/licenses/\>.
- */
- #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
|