From 8002bc1365048659428c44855de10a7f88bebe75 Mon Sep 17 00:00:00 2001 From: UtkarshPrakash <48208181+UtkarshPrakash@users.noreply.github.com> Date: Sat, 26 Oct 2019 05:45:09 +0530 Subject: [PATCH] if enemy.rect.top >= SCREEN_HEIGHT: Additionally it was if enemy.rect.top > SCREEN_HEIGHT: It has to be changed to if enemy.rect.top >= SCREEN_HEIGHT: --- mainGame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainGame.py b/mainGame.py index 07d4295..38b209f 100644 --- a/mainGame.py +++ b/mainGame.py @@ -113,7 +113,7 @@ player.is_hit = True game_over_sound.play() break - if enemy.rect.top > SCREEN_HEIGHT: + if enemy.rect.top >= SCREEN_HEIGHT: enemies1.remove(enemy) # 将被击中的敌机对象添加到击毁敌机Group中,用来渲染击毁动画