SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
AlarmRegistrationCommand Class Reference

Command to register an alarm for a GameObject. More...

#include <AlarmRegistrationCommand.h>

Inheritance diagram for AlarmRegistrationCommand:
Inheritance graph

Public Member Functions

 AlarmRegistrationCommand (Alarmable *al, AlarmableManager::ALARM_ID i, float t)
 Constructor for the AlarmRegistrationCommand.
 
 AlarmRegistrationCommand (const AlarmRegistrationCommand &)=delete
 
AlarmRegistrationCommandoperator= (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

AlarmableptrAl
 Pointer to the Alarmable object.
 
AlarmableManager::ALARM_ID id
 The alarm ID to register.
 
float dur
 The time duration for the alarm.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AlarmRegistrationCommand()

AlarmRegistrationCommand::AlarmRegistrationCommand ( Alarmable * al,
AlarmableManager::ALARM_ID i,
float t )

Constructor for the AlarmRegistrationCommand.

Parameters
alPointer to the Alarmable object.
iThe alarm ID to register.
tThe time duration for the alarm.

Member Function Documentation

◆ Execute()

void AlarmRegistrationCommand::Execute ( )
overridevirtual

Executes the command to register the alarm.

Implements CommandBase.

Here is the call graph for this function:

◆ SetTime()

void AlarmRegistrationCommand::SetTime ( float t)
inline

Sets the time duration for the alarm.

Parameters
tThe time duration to set.

The documentation for this class was generated from the following files: