Class: Component
Component is one of the key elements of the Entity-Component-System architecture. A component is there to store data, logic shouldn't exist within a component, apart from helper functions for retrieving component data. Each entity can only have 1 component of each type.
Hierarchy
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
+ new Component(key
: string): Component
Parameters:
Name | Type |
---|---|
key |
string |
Returns: Component
Properties
key
• key: string
MESSAGE_ADD
▪ Readonly
Static
MESSAGE_ADD: component_add= "component_add"
MESSAGE_REMOVE
▪ Readonly
Static
MESSAGE_REMOVE: component_remove= "component_remove"
Methods
Free
▸ Free(): void
Free releases an object or it's constituent parts back into any available object pools.
Returns: void
Implementation of: IFreeable