Ray
The Ray class inherite from the AEntity abstract class
class Ray : public AEntity
{
public:
Ray(Room &room, u_int id, short x, short y, bool &front, bool top);
virtual ~Ray() = default;
virtual void refresh();
private:
bool &_front;
size_t _counter;
int _vx;
int _vy;
};
Constructor
Parameters:
The room where the entity will be created
The id of the entity
The position x
The position y
If the weapon will be used in front or in back of the ship
if the weapon will be used on top or in bottom of the shi
Ray(Room &room, u_int id, short x, short y, bool &front, bool top);
Refresh
The refresh function move the ray
virtual void refresh();
Last updated