Skip to content

Fixed LayeredUpdates.get_sprites_at(pos) by passing a list of Rects #68

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

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

hsandt
Copy link
Contributor

@hsandt hsandt commented Feb 5, 2017

I am fixing #67 by passing a list of Rects instead of a list of Sprites to rect.collidelistall() in LayeredUpdates.get_sprites_at(pos) (method b. in my post).

If you prefer method a. (init a Rect from any object with a "rect" attribute), ask me and I'll modify rect.pyx instead.

…nstead of a list of Sprites to rect.collidelistall()
@renpytom
Copy link
Member

renpytom commented Feb 5, 2017

Hm... sprite.py is taken from pygame, so I think we should be changing it if we don't have to. It means that we're not compatible with the rest of pygame. So I think rather than doing that, we should go with method a - make rect more compatible with the pygame way of doing things.

@hsandt
Copy link
Contributor Author

hsandt commented Feb 10, 2017

OK, no problem. It will be a bit longer but feasible with hasattr and getattr. I'm not working on my Pygame project right now but when I get back to it, I'll try method a.

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

Successfully merging this pull request may close these issues.

2 participants