Class: world_state
World state describing whole world state in action planning.
Overrides operators: <, ==.
Source
C++ class world_state
Custom Constructor
world_state
Extends
Constructors
Constructor
ts
new world_state(): world_state;Default constructor.
Returns
world_state
Overrides
Constructor
ts
new world_state(another_state: world_state): world_state;Copy constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
another_state | world_state | Target world state to copy. |
Returns
world_state
Overrides
ts
EngineBinding.constructorMethods
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
clear()
ts
clear(): void;Clear all properties in the state.
Returns
void
includes()
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.
property()
ts
property(id: number): world_property;Get world property by id.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | number | Numeric if of the required property. |
Returns
Property id/state based on provided id.
remove_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
Properties
__name
ts
readonly __name: string;LuaBind instance constructor name.
Inherited from
__name
ts
readonly static __name: string;LuaBind class constructor name.