Skip to content

@tmrw-realityos/worldDocs


@tmrw-realityos/world / BaseComponent

Class: abstract BaseComponent

Base class for components

Extended by

Constructors

new BaseComponent()

new BaseComponent(): BaseComponent

Returns

BaseComponent

Properties

enabled

enabled: boolean = true

Defined in

world/components.ts:7


mustSave

mustSave: boolean = true

Defined in

world/components.ts:8


parent?

optional parent: ComponentsContainer

Defined in

world/components.ts:14


uid

uid: string = ""

Defined in

world/components.ts:9


compName

static compName: string = "unknown"

Defined in

world/components.ts:6

Accessors

entity

get entity(): undefined | Entity

set entity(_v): void

Parameters

_v: Entity

Returns

undefined | Entity

Defined in

world/components.ts:24

Methods

configure()

abstract configure(_o): void

Parameters

_o: unknown

Returns

void

Defined in

world/components.ts:16


getCompName()

getCompName(): string

Returns

string

Defined in

world/components.ts:11


onAdded()?

optional onAdded(): void

Returns

void

Defined in

world/components.ts:21


onClick()?

optional onClick(): void

Returns

void

Defined in

world/components.ts:19


onRemoved()?

optional onRemoved(): void

Returns

void

Defined in

world/components.ts:22


onUpdate()?

optional onUpdate(dt): void

Parameters

dt: number

Returns

void

Defined in

world/components.ts:20


serialize()

serialize(): void

Returns

void

Defined in

world/components.ts:17