NDK class that represents the common base of all systems.
More...
Inherited by Ndk::System< SystemType >, Ndk::System< ListenerSystem >, Ndk::System< ParticleSystem >, Ndk::System< PhysicsSystem2D >, Ndk::System< PhysicsSystem3D >, Ndk::System< RenderSystem >, and Ndk::System< VelocitySystem >.
|
template<typename ComponentType > |
void | Excludes () |
| Excludes some component from the system.
|
|
template<typename ComponentType1 , typename ComponentType2 , typename... Rest> |
void | Excludes () |
| Excludes some components from the system.
|
|
void | ExcludesComponent (ComponentIndex index) |
| Excludes some component from the system by index. More...
|
|
template<typename ComponentType > |
void | Requires () |
| Requires some component from the system.
|
|
template<typename ComponentType1 , typename ComponentType2 , typename... Rest> |
void | Requires () |
| Requires some components from the system.
|
|
void | RequiresComponent (ComponentIndex index) |
| Requires some component for the system by index. More...
|
|
template<typename ComponentType > |
void | RequiresAny () |
| Requires any component from the system.
|
|
template<typename ComponentType1 , typename ComponentType2 , typename... Rest> |
void | RequiresAny () |
| Requires any components from the system.
|
|
void | RequiresAnyComponent (ComponentIndex index) |
| Requires any component for the system by index. More...
|
|
virtual void | OnUpdate (float elapsedTime)=0 |
|
NDK class that represents the common base of all systems.
◆ BaseSystem()
Ndk::BaseSystem::BaseSystem |
( |
SystemIndex |
systemId | ) |
|
|
inline |
Constructs a BaseSystem object with an index.
- Parameters
-
systemId | Index of the system |
◆ Enable()
void Ndk::BaseSystem::Enable |
( |
bool |
enable = true | ) |
|
|
inline |
Enables the system.
- Parameters
-
enable | Should the system be enabled |
◆ ExcludesComponent()
void Ndk::BaseSystem::ExcludesComponent |
( |
ComponentIndex |
index | ) |
|
|
inlineprotected |
Excludes some component from the system by index.
- Parameters
-
index | Index of the component |
◆ Filters()
bool Ndk::BaseSystem::Filters |
( |
const Entity * |
entity | ) |
const |
Checks whether the key of the entity matches the lock of the system.
- Returns
- true If it is the case
- Parameters
-
◆ GetEntities()
const EntityList & Ndk::BaseSystem::GetEntities |
( |
| ) |
const |
|
inline |
Gets every entities that system handle.
- Returns
- A constant reference to the list of entities
◆ GetFixedUpdateRate()
float Ndk::BaseSystem::GetFixedUpdateRate |
( |
| ) |
const |
|
inline |
Gets the maximum rate of update of the system.
- Returns
- Update rate
◆ GetIndex()
SystemIndex Ndk::BaseSystem::GetIndex |
( |
| ) |
const |
|
inline |
Gets the index of the system.
- Returns
- Index of the system
◆ GetMaximumUpdateRate()
float Ndk::BaseSystem::GetMaximumUpdateRate |
( |
| ) |
const |
|
inline |
Gets the maximum rate of update of the system.
- Returns
- Update rate
◆ GetNextIndex()
SystemIndex Ndk::BaseSystem::GetNextIndex |
( |
| ) |
|
|
inlinestaticprotected |
Gets the next index for the system.
- Returns
- Next unique index for the system
◆ GetUpdateOrder()
int Ndk::BaseSystem::GetUpdateOrder |
( |
| ) |
const |
|
inline |
Gets the update order of the system.
- Returns
- Update order
- See also
- SetUpdateOrder
◆ GetWorld()
World & Ndk::BaseSystem::GetWorld |
( |
| ) |
const |
|
inline |
Gets the world on which the system operate.
- Returns
- World in which the system is
◆ HasEntity()
bool Ndk::BaseSystem::HasEntity |
( |
const Entity * |
entity | ) |
const |
|
inline |
Checks whether or not the system has the entity.
- Returns
- true If it is the case
- Parameters
-
entity | Pointer to the entity |
◆ IsEnabled()
bool Ndk::BaseSystem::IsEnabled |
( |
| ) |
const |
|
inline |
Checks whether or not the system is enabled.
- Returns
- true If it is the case
◆ RequiresAnyComponent()
void Ndk::BaseSystem::RequiresAnyComponent |
( |
ComponentIndex |
index | ) |
|
|
inlineprotected |
Requires any component for the system by index.
- Parameters
-
index | Index of the component |
◆ RequiresComponent()
void Ndk::BaseSystem::RequiresComponent |
( |
ComponentIndex |
index | ) |
|
|
inlineprotected |
Requires some component for the system by index.
- Parameters
-
index | Index of the component |
◆ SetFixedUpdateRate()
void Ndk::BaseSystem::SetFixedUpdateRate |
( |
float |
updatePerSecond | ) |
|
|
inline |
Sets the fixed update rate for the system.
- Parameters
-
updatePerSecond | Update rate, 0 means update rate is not fixed |
◆ SetMaximumUpdateRate()
void Ndk::BaseSystem::SetMaximumUpdateRate |
( |
float |
updatePerSecond | ) |
|
|
inline |
Sets the maximum update rate for the system.
- Parameters
-
updatePerSecond | Update rate, 0 means as much as possible |
◆ SetUpdateOrder()
void Ndk::BaseSystem::SetUpdateOrder |
( |
int |
updateOrder | ) |
|
Sets the update order of this system.
The system update order is used by the world it belongs to in order to know in which order they should be updated, as some application logic may rely a specific update order. A system with a greater update order (ex: 1) is guaranteed to be updated after a system with a lesser update order (ex: -1), otherwise the order is unspecified (and is not guaranteed to be stable).
- Parameters
-
updateOrder | The relative update order of the system |
- See also
- GetUpdateOrder
◆ Update()
void Ndk::BaseSystem::Update |
( |
float |
elapsedTime | ) |
|
|
inline |
Updates the system.
- Parameters
-
elapsedTime | Delta time used for the update |
The documentation for this class was generated from the following files:
- SDK/include/NDK/BaseSystem.hpp
- SDK/include/NDK/BaseSystem.inl
- SDK/src/NDK/BaseSystem.cpp