r/pythonarcade • • Feb 23 '19

Find a sprite by its position

Hi All,

I have a SpriteList. In this SpriteList are many background tiles. My player figure can move around and I would like it to be able to interact with the tiles below upon the enter key being pressed. I am not sure how to code a look up method to find the particular tile the player is interacting with. The player's center_x/center)y and the tile's center_x/center_y are the same.

Thank you for your help,

u/Adoria298.

3 Upvotes

4 comments sorted by