Class: property_evaluator
Class implementation of world properties evaluators. Generic handler to calculate current state of bound world property id.
Source
C++ class property_evaluator
Custom Constructor
property_evaluator
Extends
Extended by
Constructors
Constructor
ts
new property_evaluator(): property_evaluator;Default constructor.
Returns
property_evaluator
Overrides
Constructor
ts
new property_evaluator(object: Nillable<game_object>): property_evaluator;Parameters
| Parameter | Type | Description |
|---|---|---|
object | Nillable<game_object> | Target game object to work with, null is OK since correct object will be injected on setup. |
Returns
property_evaluator
Overrides
ts
EngineBinding.constructorConstructor
ts
new property_evaluator(object: Nillable<game_object>, name: string): property_evaluator;Parameters
| Parameter | Type | Description |
|---|---|---|
object | Nillable<game_object> | Target game object to work with, null is OK since correct object will be injected on setup. |
name | string | Name of the evaluator, used for debug purposes mainly. |
Returns
property_evaluator
Overrides
ts
EngineBinding.constructorMethods
evaluate()
ts
evaluate(): boolean;Main evaluator lifecycle method. Called every time to get world property up-to-date state.
Returns
boolean
Current evaluator value.
setup()
ts
setup(object: game_object, storage: property_storage): void;Handle setup of the evaluator and binding to a specific object.
Parameters
| Parameter | Type | Description |
|---|---|---|
object | game_object | Target client object to work with. |
storage | property_storage | Action instance storage with preconditions and state. |
Returns
void
Remarks
Called by the planner when the evaluator is registered. Call it manually only for standalone evaluator tests.
Properties
__name
ts
readonly __name: string;LuaBind instance constructor name.
Inherited from
object
ts
readonly object: game_object;Linked game object to work with.
storage
ts
readonly storage: property_storage;Container reference with state of action preconditions.
__name
ts
readonly static __name: string;LuaBind class constructor name.