EntityComponentRegistry ​
Inherits: RefCounted
Unified component manager for Entity - combines registry and factory Provides type-safe access to all entity components with lazy initialization Eliminates timing issues by ensuring components exist when accessed
Methods ​
void | setup( system_hub: GameHost.SystemHub, owner_entity: Entity ) |
Variant | get_component( type: ComponentType ) |
bool | has_component( type: ComponentType ) |
void | create_mediator( system_hub: GameHost.SystemHub, owner_entity: Entity ) |
StatsComponent | stats() |
EffectsComponent | effects() |
AbilityComponent | abilities() |
EquipmentInventoryComponent | equipment() |
InventoryComponent | inventory() |
AudioComponent | audio() |
EntityRigComponent | rig() |
EntityAnimationPlayer | animation() |
EntityStateComponent | states() |
PetManagerComponent | pets() |
EntityComponentMediator | mediator() |
Nameplate | nameplate() |
void | set_nameplate( value: Nameplate ) |
Marker3D | nameplate_marker() |
void | cleanup() |
Enumerations ​
enum ComponentType ​
The options of component type: stats, effects, abilities, equipment, inventory, audio, rig, animation, states, pets ....
- STATS =
0 - EFFECTS =
1 - ABILITIES =
2 - EQUIPMENT =
3 - INVENTORY =
4 - AUDIO =
5 - RIG =
6 - ANIMATION =
7 - STATES =
8 - PETS =
9 - MEDIATOR =
10
Method descriptions ​
void setup( system_hub: GameHost.SystemHub, owner_entity: Entity ) ​
Initialize manager with entity reference
Variant get_component( type: ComponentType ) ​
Get a component by type with safety check
bool has_component( type: ComponentType ) ​
Check if component exists
void create_mediator( system_hub: GameHost.SystemHub, owner_entity: Entity ) ​
Makes the mediator that connects the components of the entity.
StatsComponent stats() ​
Get stats component (convenience)
EffectsComponent effects() ​
Get effects component (convenience)
AbilityComponent abilities() ​
Get abilities component (convenience)
EquipmentInventoryComponent equipment() ​
Get equipment component (convenience)
InventoryComponent inventory() ​
Get inventory component (convenience)
AudioComponent audio() ​
Get audio component (convenience)
EntityRigComponent rig() ​
Get rig component (convenience)
EntityAnimationPlayer animation() ​
Get animation component (convenience)
EntityStateComponent states() ​
Get states component (convenience)
PetManagerComponent pets() ​
Get pets container (convenience)
EntityComponentMediator mediator() ​
Get mediator (convenience)
Nameplate nameplate() ​
Get nameplate reference (assigned by external HUD system)
void set_nameplate( value: Nameplate ) ​
Set nameplate reference (called by external HUD system)
Marker3D nameplate_marker() ​
Get nameplate positioning marker
void cleanup() ​
Cleanup all components