Class: Decorator

Decorator

Decorator is the base class for all decorator nodes. Thus, if you want to create new custom decorator nodes, you need to inherit from this class. When creating decorator nodes, you will need to propagate the tick signal to the child node manually, just like the composite nodes. To do that, override the `tick` method and call the `_execute` method on the child node. For instance, take a look at how the Inverter node inherit this class and how it call its children:

new Decorator()

Members


<readonly> category :string

Node category. Default to b3.DECORATOR.
Type:
  • string
Properties:
Name Type Description
category

Methods


tick(tick)

Tick method.
Parameters:
Name Type Description
tick Tick A tick instance.
Returns:
A state constant.
Type
TickStatus