ActionList Class
Namespace: SpaceUsurper
List of FsmActions, used by FSM states to specify a sequence of actions to perform when the state is entered. Also used to specify actions to execute in callbacks.
Inheritance: Object → ActionList
Examples
Example
The following example makes use of a Log, CallMethod, SetValue, Wait, and Condition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | [ { "action": "Log", "message": "This action list has started!" }, { "action": "Condition", "condition": "exampleValue > 0f", "true": [ { "action": "Log", "message": "Waiting..." }, { "action": "Wait", "time": "exampleValue" }, { "action": "Log", "message": "Calling a method!" }, { "action": "CallMethod", "target": "player", "method": "Vibrate", "params": { "strength": 0.5, "time": "rand.Float(0.25, 0.5)" } } ], "false": [ { "action": "Log", "message": "Setting exampleValue to 1!" }, { "action": "SetValue", "name": "exampleValue", "value": 1.0 } ] } ] |