diff --git a/game_functions.py b/game_functions.py index ac1edeb..ac9e082 100644 --- a/game_functions.py +++ b/game_functions.py @@ -28,4 +28,10 @@ def fire_bullet(ai_settings, screen, ship, bullets): # 创建一颗子弹,并将其加入到编组bullets中 if len(bullets) < ai_settings.bullets_allowed: new_bullet = Bullet(ai_settings, screen, ship) - bullets.add(new_bullet) \ No newline at end of file + bullets.add(new_bullet) + + +def check_keyup_events(event, ship): + """响应松开""" + if event.key == pygame.K_RIGHT: + ship.moving_right = False \ No newline at end of file