Class: FakeEntity
Hierarchy
-
↳ FakeEntity
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
+ new FakeEntity(id
: number, tags?
: string[], layers?
: string[], reactors?
: Reactor[]): FakeEntity
Parameters:
Name | Type |
---|---|
id |
number |
tags |
string[] |
layers |
string[] |
reactors |
Reactor[] |
Returns: FakeEntity
Inherited from: Fake
Properties
id
• id: number
Unique numeric identifier of the entity.
layers
• layers: string[]
A list of layers the entity belongs to, used for grouping entities.
Implementation of: IEntity.layers
tags
• tags: string[]
A list of tags the entity has, used for discriminating between entities without having to add custom components.
Implementation of: IEntity.tags
Methods
Add
▸ Add(component
: Component): void
Add adds a component to the entity.
Parameters:
Name | Type |
---|---|
component |
Component |
Returns: void
Destroy
▸ Destroy(): void
Destroy deletes the entity and all associated components.
Returns: void
Remove
▸ Remove(key
: string): void
Remove removes a component from the entity.
Parameters:
Name | Type |
---|---|
key |
string |
Returns: void