Description:
SpoilerAs the new MV sprite seems to be really convenient it's lacks a true z value who make the child hard sometime to be resort in Scene or while making plugin.
So here a proposal for help peoples to make plugin without having to deal with swapping childs in the scene for fits their needs.
Features:
Z
add a property named z in the sprite class who permit to resort child
PHP:
this.sprite = new Sprite();
this.sprite.z = 1;
复制代码
it's simple like this for working!
it's also possible to resort child of other sprites!
ResortChildren
Method who permit to resort ALL the children in the scene depending their z value!
it's should be call in the scene only like this :
Code:
this.resortChildren();
复制代码
BatchRemoveChildren
Have to remove some children you don't need anymore or when you don't want to be forced to overwrite some method or to manually remove them? This method permit to remove ANY child who have the same Z!
Code: