You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terry Cavanagh edited this page Feb 28, 2018
·
1 revision
Layer.getlayers():Array<String>
Returns a list of all currently attached layers, including "screen".
Example:
importhaxegon.*;
classMain{
functioninit(){
//Create 10 layersfor (iin0...10){
Layer.create("layer"+i);
}
//Attach every second layerfor (iin0...10){
if (i%2==0) Layer.attach("layer"+i);
}
}
functionupdate(){
//Get a list of all attached layersvarattachedlayers:String=Convert.tostring(Layer.getlayers());
//Expected result is: [screen, layer0, layer2, layer4, layer6, layer8]Text.display(0, 0, attachedlayers);
}
}