phaserjs/phaser-ce

When setting texture priorities, sprites that should not have textures get them anyway

Opened this issue · 3 comments

This Issue is about

  • A bug in the API:
    • Phaser version(s): Phaser CE v2.7.10
    • Live example: https://codepen.io/okaybenji/pen/qmgazJ
    • What should happen: Creating a sprite without passing a key to the constructor should create a textureless sprite.
    • What happens instead: The new sprite gets whatever texture was used last.

I don't believe this is the expected behavior, because if you don't set the texture priority, the sprite will be textureless.

samme commented

Adding __default to the setTexturePriority list seems to "fix" the example — unless the second sprite's key is also __default.

The problem seems to be that prioritized textures get drawn onto sprites where they don't belong, same as #231.