Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
okaybenji opened this issue May 23, 2017 · 3 comments
Labels

Comments

@okaybenji
Copy link

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 samme added the bug label May 24, 2017
@samme
Copy link
Collaborator

samme commented Jun 15, 2017

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
Copy link
Collaborator

samme commented Jun 29, 2017

@samme
Copy link
Collaborator

samme commented Jan 19, 2020

Appears fixed by #641

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants