Skip to content

Class: MockWorldState

Mock of the X-Ray engine logics world state.

Extends

Implements

  • world_state

Accessors

__name

Get Signature

ts
get __name(): string;
Returns

string

Implementation of

ts
world_state.__name

Inherited from

MockLuabindClass.__name


__name

Get Signature

ts
get static __name(): string;
Returns

string

Inherited from

MockLuabindClass.__name

Constructors

Constructor

ts
new MockWorldState(state?: world_state): MockWorldState;

Parameters

ParameterType
state?world_state

Returns

MockWorldState

Overrides

MockLuabindClass.constructor

Methods

add_property()

ts
add_property(property: world_property): void;

Set property for world state.

Parameters

ParameterTypeDescription
propertyworld_propertyTarget property to add in world state.

Returns

void

Implementation of

ts
world_state.add_property

clear()

ts
clear(): void;

Clear all properties in the state.

Returns

void

Implementation of

ts
world_state.clear

includes()

ts
includes(state: world_state): boolean;

Check if provided state is subset of current one.

Parameters

ParameterTypeDescription
stateworld_stateTarget state to check.

Returns

boolean

Whether current world state includes provided state.

Implementation of

ts
world_state.includes

property()

ts
property(id: number): world_property;

Get world property by id.

Parameters

ParameterTypeDescription
idnumberNumeric if of the required property.

Returns

world_property

Property id/state based on provided id.

Implementation of

ts
world_state.property

remove_property()

ts
remove_property(id: number): void;

Remove world property from current world state.

Parameters

ParameterTypeDescription
idnumberIdentifier of the property to remove.

Returns

void

Implementation of

ts
world_state.remove_property

create()

ts
static create(state?: world_state): MockWorldState;

Parameters

ParameterType
state?world_state

Returns

MockWorldState

Overrides

MockLuabindClass.create


mock()

ts
static mock(state?: world_state): world_state;

Parameters

ParameterType
state?world_state

Returns

world_state

Overrides

MockLuabindClass.mock

Properties

properties

ts
properties: world_property[] = [];