This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
World
Allan Deutsch edited this page Apr 1, 2018
·
1 revision
Function | Description | Parameters |
---|---|---|
World(const std::string&) | Construct a World. | const std::string& - The name of the world. Defaulted to "Nameless World" |
Function | Description | Returns | Parameters |
---|---|---|---|
bool operator==(const World &) const | Check if the two World instances are the same. | true if they are the same, false otherwise. | const World & - A reference to the other World instance. |
const std::string &Name() const | Get the name of the World. | The World's name. | N/A |
Function | Description | Returns | Parameters |
---|---|---|---|
void Update(float) | Advance the World simulation. | N/A | float - The amount of time (dt) to advance the simulation by. |
Function | Description | Returns | Parameters |
---|---|---|---|
Entity& GetEntity(EntityID) | Access an Entity instance by ID. | A reference to the Entity with the provided ID. | ID of the Entity to get. |
const Entity& GetEntity(EntityID) const | Access an Entity instance by ID. | A const reference to the Entity with the provided ID. | ID of the Entity to get. |
Function | Description | Returns | Parameters |
---|---|---|---|
EntityRef Spawn(ArchetypeRef) | Spawns an instance of an Archetype. | An EntityRef referencing the newly spawned Entity. | An ArchetypeRef to the Archetype that should be spawned. |
EntityRef Spawn(EntityRef) | Spawns an instance of an Archetype. | An EntityRef referencing the newly spawned Entity. | An EntityRef to the Archetype that should be spawned. |
Function | Description | Returns | Parameters |
---|---|---|---|
T& GetComponent<T>(EntityID) | Access a component of type T on a specific Entity. | A reference to the component. | The ID of the Entity. |
const T& GetComponent<T>(EntityID) | Access a component of type T on a specific Entity. | A const reference to the component. | The ID of the Entity. |
void* GetComponent<T>(EntityID, std::type_index) | Access a component on a specific Entity without type information. | A void * to the component of the provided type. |
|
Function | Description | Returns | Parameters |
---|---|---|---|
void AddSystem<T, Args...>(const std::string &, Args&&...) | Add a system of type T to the World. | N/A |
|
void RegisterEntitiesWith(EntitiesWith<Args...> &) | Registers an instance of EntitiesWith to be updated by the World. | N/A | EntitiesWith<Args...> & - A reference to the instance that should be kept updated by the World. |