Entity
Extends:
Static Method Summary
| Static Public Methods | ||
| public static |
|
|
| public static |
getSchema(): import("../savegame/serialization").Schema |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(root: GameRoot) |
|
Member Summary
| Public Members | ||
| public |
components: * The components of the entity |
|
| public |
layer: Layer On which layer this entity is |
|
| public |
Whether this entity was registered on the @see EntityManager so far |
|
| public |
root: * Handle to the global game root |
|
| public |
Internal entity unique id, set by the @see EntityManager |
|
Method Summary
| Public Methods | ||
| public |
addComponent(componentInstance: Component, force: boolean) Adds a new component, only possible until the entity is registered on the entity manager, after that use @see EntityManager.addDynamicComponent |
|
| public |
clone(): * Returns a clone of this entity |
|
| public |
drawDebugOverlays(parameters: DrawParameters) Draws the entity, to override use @see Entity.drawImpl |
|
| public |
drawImpl(parameters: DrawParameters) override, should draw the entity |
|
| public |
getId(): * |
|
| public |
removeComponent(componentClass: typeof Component, force: boolean) Removes a given component, only possible until the entity is registered on the entity manager, after that use @see EntityManager.removeDynamicComponent |
|
Inherited Summary
| From class BasicSerializableObject | ||
| public static |
|
|
| public static |
getId() |
|
| public static |
Should return the serialization schema |
|
| public static |
|
|
| public |
deserialize(data: any, root: import("./savegame_serializer").GameRoot): string | void |
|
| public |
|
|
Static Public Methods
public static getSchema(): import("../savegame/serialization").Schema source
Should return the serialization schema
Override:
BasicSerializableObject#getSchemaReturn:
| import("../savegame/serialization").Schema |
Public Constructors
public constructor(root: GameRoot) source
Fixes typeof DerivedComponent is not assignable to typeof Component, compiled out in non-dev builds
Override:
BasicSerializableObject#constructorParams:
| Name | Type | Attribute | Description |
| root | GameRoot |
Public Members
Public Methods
public addComponent(componentInstance: Component, force: boolean) source
Adds a new component, only possible until the entity is registered on the entity manager, after that use @see EntityManager.addDynamicComponent
public drawDebugOverlays(parameters: DrawParameters) source
Draws the entity, to override use @see Entity.drawImpl
Params:
| Name | Type | Attribute | Description |
| parameters | DrawParameters |
public drawImpl(parameters: DrawParameters) source
override, should draw the entity
Params:
| Name | Type | Attribute | Description |
| parameters | DrawParameters |
public removeComponent(componentClass: typeof Component, force: boolean) source
Removes a given component, only possible until the entity is registered on the entity manager, after that use @see EntityManager.removeDynamicComponent
Params:
| Name | Type | Attribute | Description |
| componentClass | typeof Component | ||
| force | boolean |
