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.__nameInherited from
__name
Get Signature
ts
get static __name(): string;Returns
string
Inherited from
Constructors
Constructor
ts
new MockWorldState(state?: world_state): MockWorldState;Parameters
| Parameter | Type |
|---|---|
state? | world_state |
Returns
MockWorldState
Overrides
Methods
add_property()
ts
add_property(property: world_property): void;Set property for world state.
Parameters
| Parameter | Type | Description |
|---|---|---|
property | world_property | Target property to add in world state. |
Returns
void
Implementation of
ts
world_state.add_propertyclear()
ts
clear(): void;Clear all properties in the state.
Returns
void
Implementation of
ts
world_state.clearincludes()
ts
includes(state: world_state): boolean;Check if provided state is subset of current one.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | world_state | Target state to check. |
Returns
boolean
Whether current world state includes provided state.
Implementation of
ts
world_state.includesproperty()
ts
property(id: number): world_property;Get world property by id.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | number | Numeric if of the required property. |
Returns
world_property
Property id/state based on provided id.
Implementation of
ts
world_state.propertyremove_property()
ts
remove_property(id: number): void;Remove world property from current world state.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | number | Identifier of the property to remove. |
Returns
void
Implementation of
ts
world_state.remove_propertycreate()
ts
static create(state?: world_state): MockWorldState;Parameters
| Parameter | Type |
|---|---|
state? | world_state |
Returns
MockWorldState
Overrides
mock()
ts
static mock(state?: world_state): world_state;Parameters
| Parameter | Type |
|---|---|
state? | world_state |
Returns
world_state
Overrides
Properties
properties
ts
properties: world_property[] = [];