change Player.move

This commit is contained in:
2025-02-02 01:33:15 +08:00
parent 705b5c746a
commit 038b876b15
2 changed files with 14 additions and 21 deletions

View File

@@ -41,7 +41,7 @@ class Block:
top = real_y - (PLAYER_SIZE + BLOCK_SIZE) / 2
bottom = real_y + (PLAYER_SIZE + BLOCK_SIZE) / 2
# 判碰撞:
return left < player.x < right and top < player.y < bottom
return left < player.x < right and top < player.y < bottom and self.collision
def get_collision_surface(self) -> tuple[int, int, int, int]:
# 获得方块表面界限(碰撞面)