-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add texture atlas sprites #22
Add texture atlas sprites #22
Conversation
@cBournhonesque Thanks for the PR! I think this is an excellent idea and I agree with your approach. I think something like a I also like the idea of optionally randomizing the chosen Sprite on spawn. I'm not sure We can leave this part off for now and add it later too, but I think the best approach would be to do allow either defining something like |
Sounds great! I'll work on both changes! |
Yeah, there's no rotation currently, but that would also be great to add. For the sake of scope, that should probably be a different PR. I'll file an issue with some details. |
@abnormalbrain I adjusted my PR to match your comment :) I didn't add an example but have been using it in my game with TextureAtlasSprite Probably another variant of |
@cBournhonesque This looks great! Left one comment for discussion about copy vs clone, but I'm very happy with this and willing to merge as is. |
PR to be able to handle sprites that come from texture atlas.
My use-case is that all my image assets are stored in a texture atlas, so I need this change to be able to use the library.
I think that it would be interesting to let users have a particle sprite-sheet and the particles randomly use a sprite from the sprite sheet.
This PR is unpolished, I just opened it to see if it's a good idea for you.
If so, I would probably add an SpriteEnum to have 2 mutually exclusive options (Sprite or TextureAtlasSprite)