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
Systems
Allan Deutsch edited this page Apr 7, 2018
·
1 revision
Name | Type | Description |
---|---|---|
Dt |
float |
This member will automatically be set to the duration of the frame before any of the system's functionality is invoked. |
Entities |
EntitiesWith<Components...> |
The Entities container will automatically be populated with all the entities in the world that have all the component types specified. They should be correctly const-qualified, such that any components which are not modified should be specified as a const type, ie const Transform . |
Note: The methods documented below will be called in the order they are documented in below.
Name | Type | Description |
---|---|---|
OnFrameStart |
void(void) |
This function is called once per frame at the start of the frame for each system, before any of them have performed update logic. |
PreProcess |
void(void) |
This function is called once per frame prior to the Process method. It should be used to prepare data to be used by Process or Update methods. |
Process |
void(Components...) const |
This function will be invoked in parallel once for each entity that has all the component types it takes as arguments. For best results and performance with multithreading, any components which are not modified in the function should be const arguments. This function itself must be const so that it can safely be called in a parallel context. This function should not be used if anything other than the arguments need to be modified. |
PostProcess |
void(void) |
This function is called once per frame after the Process method. It should be used to finalize any work that was done in Process . |
Update |
void(void) |
This function will automatically be called once per frame. |
Update |
void(float) |
This function will automatically be called once per frame with the duration of frame Dt passed in as the argument. |
EditorUpdate |
void(void) |
This function will be called once per frame while the simulation is "paused" for game developer interaction via an editor. |
FixedUpdate |
void(void) |
This function will be called once each time the fixed update timestep (default of 1/60th of a second) has elapsed. As an example, a simulation running at 120FPS would have the FixedUpdate method called every other frame. |