DanmakuJSON "destroy" Action

Destroys the executing bullet-source.

Optional Parameters

ParameterTypeDescription
delay Term The time (in seconds) for which the destruction is delayed. (Default value: 0.0)
wait bool Specifies if the behaviour of the executing bullet-source will be paused until this action has finished (Default value: false)

Examples

root:
{
    behaviour:
    [
        {shoot: {bullet: "BulletA", angle: 180}},
        {shoot: {bullet: "BulletB", angle: -160}},
        {shoot: {bullet: "BulletC", angle: 160}}
    ]
},

bullets:
{
    BulletA:
    {
        speed: 5,
        behaviour:
        [
            # Pause for 1.5 seconds...
            {wait: {duration: 1.5}},

            # ...then destroy immediately
            destroy
        ]
    },

    BulletB:
    {
        speed: 5,
        behaviour:
        [
            # Pause the behavior and destroy in 1.5 seconds
            {destroy: {delay: 1.5, wait: true}}
        ]
    },

    BulletC:
    {
        speed: 5,
        behaviour:
        [
            # Destroy in 1.5 seconds...
            {destroy: {delay: 1.5}},

            # ...pause behavior and rotate by 180 degrees
            # within a second
            {rotate: {angle: 180, duration: 1, wait: true}}
        ]
    }
}

 


Leave a comment