|
Nebula
|
#include <component.h>
Used for registering component types to the game world.
Public Types | |
| using | OnInitFunc = void (*)(Game::World*, Game::Entity, COMPONENT_TYPE*) |
| using | OnDecayFunc = void (*)(Game::World*, Game::Entity, COMPONENT_TYPE*) |
Public Attributes | |
| bool | decay = false |
| Set to true if the component should end up in the decay buffer before being completely destroyed. | |
| OnInitFunc | OnInit = nullptr |
| initialization function to run for the component, or nullptr if not needed. | |
| OnDecayFunc | OnDecay = nullptr |
| function to run when the component is removed from a live entity, or when the entity is deleted. | |
| using Game::ComponentRegisterInfo< COMPONENT_TYPE >::OnDecayFunc = void (*)(Game::World*, Game::Entity, COMPONENT_TYPE*) |
| using Game::ComponentRegisterInfo< COMPONENT_TYPE >::OnInitFunc = void (*)(Game::World*, Game::Entity, COMPONENT_TYPE*) |
| bool Game::ComponentRegisterInfo< COMPONENT_TYPE >::decay = false |
Set to true if the component should end up in the decay buffer before being completely destroyed.
| OnDecayFunc Game::ComponentRegisterInfo< COMPONENT_TYPE >::OnDecay = nullptr |
function to run when the component is removed from a live entity, or when the entity is deleted.
Runs outside the frame pipeline while the component is still readable from its table, which allows cleaning up or marking up anything related to the component. Independent of the decay buffer. nullptr if not needed.
| OnInitFunc Game::ComponentRegisterInfo< COMPONENT_TYPE >::OnInit = nullptr |
initialization function to run for the component, or nullptr if not needed.