Closed hsandt closed 6 years ago
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.
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.
I am fixing https://github.com/renpy/pygame_sdl2/issues/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.