pygame では、ショットがゾンビに当たるたびにポイントを 1000 ずつ増加させようとしています。ゾンビの位置は zhot[XX] と zhot[YY] です。ゾンビの周りに長方形を作成し、collidepoint 関数を使用してこれを達成しようとしましたが、ショットが長方形を通過すると、その位置のすべての変化が 1000 ポイントとしてカウントされるため、1 つのゾンビを撃つと 30000 ポイントのようになります。どうすればこれを修正できますか?
for shot in shots:
zomrect2=Rect(zhot[XX],zhot[YY],49,38)
if zomrect2.collidepoint(shot[X],shot[Y]):
points+=1000