I having problems with bringToTop
https://github.com/photonstorm/phaser/blob/master/src/utils/array/BringToTop.js#L23 When you try to bring to the top the second element, the element stills in the same position.
I just made a small change to replace:
if (currentIndex !== -1 && currentIndex < array.length - 2) for
if (currentIndex !== -1 && currentIndex < array.length - 1)
It works, but I want to know if there is any decision behind this, I read that the previous implementation used and it doesn't have this '-2'.
I ran into this issue too. As a workaround I called bringToTop on a couple of other sprites that I don't care about first. That changes the position of the sprite I want and bringToTop will then work.
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.