phaser-ce icon indicating copy to clipboard operation
phaser-ce copied to clipboard

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

Open okaybenji opened this issue 8 years ago • 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.

okaybenji avatar May 23 '17 21:05 okaybenji

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.

samme avatar Jun 15 '17 23:06 samme

Appears fixed by #641

https://codepen.io/samme/pen/JjoeGaW

samme avatar Jan 19 '20 21:01 samme