我想知道如何编写能够检测鼠标点击精灵的代码.例如:
if #Function that checks for mouse clicked on Sprite: print ("You have opened a chest!")
python pygame mouseevent
mouseevent ×1
pygame ×1
python ×1