Class: Action

Action

Action is the base class for all action nodes. Thus, if you want to create new custom action nodes, you need to inherit from this class. For example, take a look at the Runner action: var Runner = b3.Class(b3.Action); var p = Runner.prototype; p.name = 'Runner'; p.tick = function(tick) { return b3.RUNNING(); }

new Action()

Members


<readonly> category :string

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

Methods


tick(tick)

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