Entity

Summary

Properties

Name Type
typeInfo TypeInformation
data DataContainer | nil
uniqueId int
instanceId int
bus EntityBus | nil

Methods

Method Returns
Init(realm: Realm, enableAllowed: bool, isGhost: bool = false) void
Destroy() void
Is(typeName: string) bool
FireEvent(eventId: int) void
FireEvent(eventName: string) void
FireEvent(event: EntityEvent) void
PropertyChanged(propertyId: int) void
PropertyChanged(propertyId: int, value: any) void
PropertyChanged(propertyName: string) void
PropertyChanged(propertyName: string, value: any) void
RegisterEventCallback(callback: callable) int
RegisterEventCallback(context: any, callback: callable) int
UnregisterEventCallback(handle: int) void
RegisterCreateCallback(callback: callable) int
RegisterCreateCallback(context: any, callback: callable) int
UnregisterCreateCallback(handle: int) void
RegisterDestroyCallback(callback: callable) int
RegisterDestroyCallback(context: any, callback: callable) int
UnregisterDestroyCallback(handle: int) void
RegisterInitCallback(callback: callable) int
RegisterInitCallback(context: any, callback: callable) int
UnregisterInitCallback(handle: int) void
RegisterDeinitCallback(callback: callable) int
RegisterDeinitCallback(context: any, callback: callable) int
UnregisterDeinitCallback(handle: int) void

Operators

Operator Rhs Returns
== Entity bool

Properties

typeInfo

TypeInformation

data

DataContainer | nil

uniqueId

int

instanceId

int

bus

EntityBus | nil

Methods

Init

Init(realm: Realm, enableAllowed: bool, isGhost: bool = false)

Parameters

Name Type Description
realm Realm
enableAllowed bool
isGhost bool

Destroy

Destroy()

Is

Is(typeName: string): bool

Parameters

Name Type Description
typeName string

Returns

Type Description
bool

FireEvent

FireEvent(eventId: int)

Parameters

Name Type Description
eventId int

FireEvent

FireEvent(eventName: string)

Parameters

Name Type Description
eventName string

FireEvent

FireEvent(event: EntityEvent)

Parameters

Name Type Description
event EntityEvent

PropertyChanged

PropertyChanged(propertyId: int)

Parameters

Name Type Description
propertyId int

PropertyChanged

PropertyChanged(propertyId: int, value: any)

Parameters

Name Type Description
propertyId int
value any

PropertyChanged

PropertyChanged(propertyName: string)

Parameters

Name Type Description
propertyName string

PropertyChanged

PropertyChanged(propertyName: string, value: any)

Parameters

Name Type Description
propertyName string
value any

RegisterEventCallback

RegisterEventCallback(callback: callable): int

Parameters

Name Type Description
callback callable A callback in the form function(entity: Entity, event: EntityEvent): bool.

Returns

Type Description
int

RegisterEventCallback

RegisterEventCallback(context: any, callback: callable): int

Parameters

Name Type Description
context any A context value to pass to the callback.
callback callable A callback in the form function(context: any, entity: Entity, event: EntityEvent): bool.

Returns

Type Description
int

UnregisterEventCallback

UnregisterEventCallback(handle: int)

Parameters

Name Type Description
handle int

RegisterCreateCallback

RegisterCreateCallback(callback: callable): int

Parameters

Name Type Description
callback callable A callback in the form function(entity: Entity, transform: LinearTransform): bool.

Returns

Type Description
int

RegisterCreateCallback

RegisterCreateCallback(context: any, callback: callable): int

Parameters

Name Type Description
context any A context value to pass to the callback.
callback callable A callback in the form function(context: any, entity: Entity, transform: LinearTransform): bool.

Returns

Type Description
int

UnregisterCreateCallback

UnregisterCreateCallback(handle: int)

Parameters

Name Type Description
handle int

RegisterDestroyCallback

RegisterDestroyCallback(callback: callable): int

Parameters

Name Type Description
callback callable A callback in the form function(entity: Entity): bool.

Returns

Type Description
int

RegisterDestroyCallback

RegisterDestroyCallback(context: any, callback: callable): int

Parameters

Name Type Description
context any A context value to pass to the callback.
callback callable A callback in the form function(context: any, entity: Entity): bool.

Returns

Type Description
int

UnregisterDestroyCallback

UnregisterDestroyCallback(handle: int)

Parameters

Name Type Description
handle int

RegisterInitCallback

RegisterInitCallback(callback: callable): int

Parameters

Name Type Description
callback callable A callback in the form function(entity: Entity): bool.

Returns

Type Description
int

RegisterInitCallback

RegisterInitCallback(context: any, callback: callable): int

Parameters

Name Type Description
context any A context value to pass to the callback.
callback callable A callback in the form function(context: any, entity: Entity): bool.

Returns

Type Description
int

UnregisterInitCallback

UnregisterInitCallback(handle: int)

Parameters

Name Type Description
handle int

RegisterDeinitCallback

RegisterDeinitCallback(callback: callable): int

Parameters

Name Type Description
callback callable A callback in the form function(entity: Entity): bool.

Returns

Type Description
int

RegisterDeinitCallback

RegisterDeinitCallback(context: any, callback: callable): int

Parameters

Name Type Description
context any A context value to pass to the callback.
callback callable A callback in the form function(context: any, entity: Entity): bool.

Returns

Type Description
int

UnregisterDeinitCallback

UnregisterDeinitCallback(handle: int)

Parameters

Name Type Description
handle int

Operators

operator==

operator==(rhs: Entity): bool

Parameters

Name Type Description
rhs Entity

Returns

Type Description
bool