layer_get_all


描述

This function will return an array populated with the unique ID values of each layer in the room.


语法:

layer_get_all()


返回:

Array (1D, populated with Layer IDs)


例如:

var a = layer_get_all();
for (var i = 0; i < array_length_1d(a); i++;)
   {
   layer_destroy(a[i]);
   }

The above code retrieves all the layers in a room and adds thei rID values to an array. This array is then parsed to destroy or the room layers.


上一页: General Layer Functions
next: layer_get_all_elements
© Copyright YoYo Games Ltd. 2018 All Rights Reserved