#include <Clock.hpp>
◆ Clock()
◆ ~Clock()
◆ addClockComponent()
It adds a component to the clock
- Parameters
-
entity | The entity to which the component is attached. |
type | The type of the component you want to add to the clock. |
updateTime | The time in milliseconds between each update. |
◆ componentUpdateNumber()
"If the time since the last update is greater than the timer, then update the
entity and return the number of times the entity was updated."
The function is a bit more complicated than that, but that's the gist of it
- Parameters
-
entity | The entity to check for updates. |
type | The type of the component you want to update. |
- Returns
- The number of times the component has been updated.
◆ eraseClock()
void Clock::eraseClock |
( |
size_t |
entity | ) |
|
It erases the clock of the entity passed in parameter
- Parameters
-
entity | The entity you want to erase the clock of. |
◆ eraseClockComponent()
void Clock::eraseClockComponent |
( |
size_t |
entity, |
|
|
ECS::ComponentType |
type, |
|
|
bool |
debug = false |
|
) |
| |
It removes a component from the clock
- Parameters
-
entity | The entity ID from where the component will be removed. |
type | The type of the component to be removed. |
debug | if true, the function will print some information about the removal of the component. |
- Returns
- A reference to the component of the entity.
◆ getEntitiesToUpdate()
std::deque< std::pair< size_t, std::deque< ECS::ComponentType > > > Clock::getEntitiesToUpdate |
( |
| ) |
|
It returns a deque of pairs of entity IDs and component types that need to be updated
- Returns
- A deque of pairs of size_t and deque of ComponentType.
The documentation for this class was generated from the following files: