Class: PositionComponent
Defined in: common/components/position-component.ts:7
Component to represent the position of an entity in 2D space.
Extends
Constructors
Constructor
new PositionComponent(
x,y):PositionComponent
Defined in: common/components/position-component.ts:23
Creates an instance of PositionComponent.
Parameters
x
number = 0
The x-coordinate of the position.
y
number = 0
The y-coordinate of the position.
Returns
PositionComponent
Overrides
Properties
local
local:
Vector2
Defined in: common/components/position-component.ts:11
The local position of the entity relative to its parent (if any).
world
world:
Vector2
Defined in: common/components/position-component.ts:16
The world position of the entity in the global coordinate space.
Accessors
id
Get Signature
get
staticid():symbol
Defined in: ecs/types/Component.ts:12
The unique id of the component.
Returns
symbol