© 1999-2048 dssz.net 粤ICP备11031372号
[其它] pygame实现俄罗斯方块游戏(基础篇2)
说明:接上章《pygame实现俄罗斯方块游戏(基础篇1)》继续写俄罗斯方块游戏 五、计算方块之间的碰撞 在Panel类里增加函数 def check_overlap(self, diffx, diffy): for x,y in self.moving_block.get_rect_arr(): for rx,ry in self.rect_arr: if x+diffx==rx and y+diffy==ry: return True return False 修改move_bl<weixin_38529293> 上传 | 大小:154kb