190 lines
5.7 KiB
JSON
190 lines
5.7 KiB
JSON
|
|
{
|
||
|
|
"TimeoutSucceed": {
|
||
|
|
"description": "Forces a behavior to succeed after a given number of milliseconds.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": ["int"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "getTimeout",
|
||
|
|
"description": "Enter the number of milliseconds until forced success."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"TimeoutSucceedJs": {
|
||
|
|
"description": "Uses JavaScript to force a behavior to succeed after a given number of milliseconds.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": ["Function"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "getTimeout",
|
||
|
|
"description": "Return the number of milliseconds until forced success.",
|
||
|
|
"defaultValue": "() => {\n return 0;\n}"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"TimeoutJs": {
|
||
|
|
"description": "Succeeds after a given number of dynamically-calculated milliseconds.",
|
||
|
|
"type": "leaf",
|
||
|
|
"args": ["Function"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "getTimeout",
|
||
|
|
"description": "Return the number of milliseconds until forced success.",
|
||
|
|
"defaultValue": "() => {\n return 0;\n}"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"TimeoutFail": {
|
||
|
|
"description": "Forces a behavior to fail after a given number of milliseconds.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": ["int"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "getTimeout",
|
||
|
|
"description": "Enter the number of milliseconds until forced failure."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"FailOnCondition": {
|
||
|
|
"description": "Forces a behavior to fail if specified condition returns false.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": [
|
||
|
|
"Function",
|
||
|
|
"Function"
|
||
|
|
],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "initVars",
|
||
|
|
"description": "Initialize optional variables for the condition below."
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"field": "condition",
|
||
|
|
"description": "Return true when you want behavior to fail."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"Case": {
|
||
|
|
"description": "Use under Switch statements to specify when a behavior should execute and when it should fail.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": [
|
||
|
|
"Function"
|
||
|
|
],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "condition",
|
||
|
|
"description": "Return false for conditions under which behavior should fail."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"SucceedOnCondition": {
|
||
|
|
"description": "Forces a behavor to succeed if its conditional function returns true.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": [
|
||
|
|
"Function",
|
||
|
|
"Function"
|
||
|
|
],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "initVars",
|
||
|
|
"description": "Initialize optional variables for the condition below."
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"field": "condition",
|
||
|
|
"description": "Return true when you want behavior to succeed."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"StartOnCondition": {
|
||
|
|
"description": "Prevents a behavior from starting until its conditional function returns true.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": [
|
||
|
|
"Function",
|
||
|
|
"Function"
|
||
|
|
],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "initVars",
|
||
|
|
"description": "Initialize optional variables for the condition below."
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"field": "condition",
|
||
|
|
"description": "Return true when you want component to start."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"WhileCondition": {
|
||
|
|
"description": "Repeats a behavior until its conditional function returns false.",
|
||
|
|
"type": "decorator",
|
||
|
|
"args": [
|
||
|
|
"Function",
|
||
|
|
"Function"
|
||
|
|
],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "initVars",
|
||
|
|
"description": "Initialize optional variables for the condition below."
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"field": "condition",
|
||
|
|
"description": "Repeat behavior as long as condition return true.",
|
||
|
|
"defaultValue": "() => {\n return true;\n}"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"ExecuteScript": {
|
||
|
|
"description": "Synchronously executes arbitrary JavaScript. Use ExecuteScriptAsync for asynchronous calls.",
|
||
|
|
"type": "leaf",
|
||
|
|
"args": ["Function"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "execScript",
|
||
|
|
"description": "Enter function that will execute once and then succeed."
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"ExecuteScriptAsync": {
|
||
|
|
"description": "Asynchronously executes arbitrary JavaScript. Will not succeed until the callback is called.",
|
||
|
|
"type": "leaf",
|
||
|
|
"args": ["Function"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "execScript",
|
||
|
|
"description": "Behavior will succeed when succeed is called, fail when fail is called.",
|
||
|
|
"defaultValue": "(succeed, fail) => {\n succeed();\n}"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"Null": {
|
||
|
|
"description": "This behavior never succeeds or fails. It will remain 'in progress' indefinitely. It must be decorated in order to succeed or fail.",
|
||
|
|
"type": "leaf",
|
||
|
|
"args": []
|
||
|
|
},
|
||
|
|
"Sequence": {
|
||
|
|
"description": "This behavior plays its children in order from top to bottom. If one child fails, this behavior will fail. If all its children succeed ,this behavor will succeed.",
|
||
|
|
"type": "composite",
|
||
|
|
"args": []
|
||
|
|
},
|
||
|
|
"Parallel": {
|
||
|
|
"description": "This behavior starts all of its children at the same time. This behavior will return success by default when all of its children have succeeded, or, if told to succeed on one, will succeed upon success of any child.",
|
||
|
|
"type": "composite",
|
||
|
|
"args": ["boolean"],
|
||
|
|
"meta": [
|
||
|
|
{
|
||
|
|
"field": "succeedOnOne",
|
||
|
|
"description": "Set to True to force parallel to succeed as soon as one of its children succeeds.",
|
||
|
|
"defaultValue": false
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"Switch": {
|
||
|
|
"description": "Attempts to execute its children in order from top to bottom until one child succeeds. This behavior always succeeds regardless of whether any children succeed. Use this behavior with Case decorators for branching.",
|
||
|
|
"type": "composite",
|
||
|
|
"args": []
|
||
|
|
},
|
||
|
|
"Random": {
|
||
|
|
"description": "Chooses one of its children randomly. Succeeds if that child succeeds and fails otherwise.",
|
||
|
|
"type": "composite",
|
||
|
|
"args": []
|
||
|
|
}
|
||
|
|
}
|