Skip to main content

Class: PositionComponent

Defined in: common/components/position-component.ts:7

Component to represent the position of an entity in 2D space.

Implements

Constructors

Constructor

new PositionComponent(x, y): PositionComponent

Defined in: common/components/position-component.ts:26

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

Properties

local

local: Vector2

Defined in: common/components/position-component.ts:13

The local position of the entity relative to its parent (if any).


name

name: symbol

Defined in: common/components/position-component.ts:8

The unique name of the component.

Implementation of

Component.name


world

world: Vector2

Defined in: common/components/position-component.ts:17

The world position of the entity in the global coordinate space.


symbol

readonly static symbol: typeof symbol

Defined in: common/components/position-component.ts:19