diff --git a/module/block.py b/module/block.py index 5455ccd..dc167bb 100644 --- a/module/block.py +++ b/module/block.py @@ -46,13 +46,10 @@ class Block: def get_collision_surface(self) -> tuple[int, int, int, int]: # 获得方块表面界限(碰撞面) # 上、右、下、左 - real_x = self.x * BLOCK_SIZE + BLOCK_SIZE / 2 - real_y = self.y * BLOCK_SIZE + BLOCK_SIZE / 2 - - top = real_y - BLOCK_SIZE / 2 - bottom = real_y + BLOCK_SIZE / 2 - left = real_x - BLOCK_SIZE / 2 - right = real_x + BLOCK_SIZE / 2 + top = self.y * BLOCK_SIZE + bottom = top + BLOCK_SIZE + left = self.x * BLOCK_SIZE + right = left + BLOCK_SIZE return top, right, bottom, left def get_center_vector(self):