def hit(self,x,y,t,s):
tiles = self.tiles
tw,th = tiles[0].image.get_width(),tiles[0].image.get_height()
t.tx = x
t.ty = y
t.rect = Rect(x*tw,y*th,tw,th)
t._rect = t.rect
if hasattr(t,'hit'):
t.hit(self,t,s)
文章目录