feat: started implementing infrared and laser

This commit is contained in:
Pax1601
2025-01-29 08:03:32 +01:00
parent 79f9905413
commit 5a4a202805
10 changed files with 231 additions and 2 deletions

View File

@@ -430,3 +430,43 @@ private:
const unsigned int intensity;
const string explosionType;
};
/* Shine a laser with a specific code */
class Laser : public Command
{
public:
Laser(unsigned int ID, unsigned int code, Coords destination, function<void(void)> callback = []() {}) :
Command(callback),
ID(ID),
destination(destination),
code(code)
{
priority = CommandPriority::LOW;
};
virtual string getString();
virtual unsigned int getLoad() { return 5; }
private:
const unsigned int ID;
const unsigned int code;
const Coords destination;
};
/* Shine a infrared light */
class Infrared : public Command
{
public:
Infrared(unsigned int ID, Coords destination, function<void(void)> callback = []() {}) :
Command(callback),
ID(ID),
destination(destination)
{
priority = CommandPriority::LOW;
};
virtual string getString();
virtual unsigned int getLoad() { return 5; }
private:
const unsigned int ID;
const Coords destination;
};