Command to register an alarm for a GameObject. More...
#include <AlarmRegistrationCommand.h>

Public Member Functions | |
| AlarmRegistrationCommand (Alarmable *al, AlarmableManager::ALARM_ID i, float t) | |
| Constructor for the AlarmRegistrationCommand. | |
| AlarmRegistrationCommand (const AlarmRegistrationCommand &)=delete | |
| AlarmRegistrationCommand & | operator= (const AlarmRegistrationCommand &)=delete |
| void | Execute () override |
| Executes the command to register the alarm. | |
| void | SetTime (float t) |
| Sets the time duration for the alarm. | |
Public Member Functions inherited from CommandBase | |
| virtual | ~CommandBase ()=default |
| Destructor for CommandBase. | |
Public Attributes | |
| Alarmable * | ptrAl |
| Pointer to the Alarmable object. | |
| AlarmableManager::ALARM_ID | id |
| The alarm ID to register. | |
| float | dur |
| The time duration for the alarm. | |
Command to register an alarm for a GameObject.
The AlarmRegistrationCommand class is responsible for registering an alarm for a GameObject. It inherits from CommandBase and provides the necessary functionality to register the alarm with the AlarmableManager.
| AlarmRegistrationCommand::AlarmRegistrationCommand | ( | Alarmable * | al, |
| AlarmableManager::ALARM_ID | i, | ||
| float | t ) |
Constructor for the AlarmRegistrationCommand.
| al | Pointer to the Alarmable object. |
| i | The alarm ID to register. |
| t | The time duration for the alarm. |
|
overridevirtual |
Executes the command to register the alarm.
Implements CommandBase.

|
inline |
Sets the time duration for the alarm.
| t | The time duration to set. |