Script
Script
Generic script component. Will execute code supplied in the constructor. Requires ScriptSystem to be registered on EntityManager.
Prefer to use BehaviorComponent instead, as it's a more flexible solution.
BehaviorComponent.from(ActionBehavior.from(function(){...})) is equivalent to new Script(function(){...})
Kind: global class
new Script([options])
| Param | Type |
|---|---|
| [options] | function | Array.<function()> |