ECSManager - NocturnalWisp/Tynted-Engine GitHub Wiki
Getting Started
The ECSManager is the most important class in Tynted Engine. It contains static functions intended to add, remove, or alter all the different kind of objects the engine handles. The API for it can be found here.
Functions
There are many different functions to do with Systems, Components, Entities, and Events, but there are some main ones that should be gone over:
- AddSystem - Places a system into Tynted Engine so it can be utilized whenever it is needed.
- AddComponent - Much like the AddSystem, it differs in how it adds a component that can be added to entities.
Entity Specific
- CreateEntity - Creates a new entity.
- DeleteEntity - Deletes an entity.
Components
- GetComponentEntityActiveList - This return an EntityComponent list of all the entity-component pairs that are currently active and in an active scene.
- GetComponentEntityList - Like the previous, but returns all entity-components active or not.
- AddEntityComponent - Adds a new component to the entity of the specified type.
- RegisterEntityComponents - Takes in a list of Entity-Component Identifiers to add components in batch.
- RemoveEntityComponent - Removes a component from an entity.
- GetEntityComponents - Gets all the components on an entity
Events
- CreateEvent[1arg,2arg] - Creates a new TyntedEvent
- SubscribeEvent - Subscribes an action to the event by name.
- UnSubscribeEvent - Unsubscribes an action from the specified event.