DanmakuJSON "trigger" Action
Fires a named trigger, which can be handled in your game or application.
Required Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the trigger |
Optional Parameters
Parameter | Type | Description |
---|---|---|
params | StringMap | A set of string-parameters which can be used in your code |
Remarks
Note, that you have to implement your own handling of triggers.Examples
root:
{
angle: 180,
repeatBehaviour: true,
behaviour:
[
# Shoot some bullets...
{repeat: {times: 10, actions:
[
{shoot: {speed: 6}},
# Rotate the root-emitter...
{rotate: {angle: 10}},
# Wait for 0.1 seconds...
{wait: {duration: 0.1}}
]}},
# Trigger "bulletsFired" which can be
# handled in your application code...
{trigger: {name: "bulletsFired",
params: {myParam: "myValue"}
}},
# Wait for one second...
{wait: {duration: 1}}
]
}