part_system_layer


描述

This function can be used to switch a particle system from its current layer to a new one. You supply the particle system ID value (as returned by the function part_system_create_layer) and then the unique layer ID (as returned by the function layer_create() or the name of the layer to use as a string - for example "instance_layer" - as defined in the room editor), and the system will be moved to the new layer.


语法:

part_system_layer(ps, layer);

参数 描述
ps The particle system ID
layer The new layer ID


返回:

N/A(无返回值)


例如:

if part_system_get_layer(global.p_sys) != "effects_layer"
    {
    part_system_layer(global.p_sys, "effects_layer";
    }

The above code will check a particle system to see what layer it is on and if it is not on the given layer it will be changed.