default layer
nicoX

Hello

 

I am trying to understand what layer is used for sprites where I don't specify the layer number. I was sure it was layer 0 (because they always appear in front of the other objects), but then I tried to use wade.getLayerDataURL(0) and got a blank image, suggesting that there is nothing on layer 0.

So where are they?

All 3 Comments
Gio

Hi nicoX

 

They are all on layer 1.

Shri

Nico,

 

You can also just do  --- > console.log(spriteName.getLayerId());  to show you the layer id of spriteName

For the iso stuff, the default layer is 25 (i think I'm remembering that right ?).

I had to use this when I was doing ui stuff in one of my isometric games and wanted to make sure the ui was above the iso stuff.

 

cheers

nicoX

Thanks guys, very useful information. I hadn't thought about getLayerId(),  thanks!

Post a reply
Add Attachment
Submit Reply
Login to Reply