更新 'game_functions.py'

This commit is contained in:
206530211 2021-06-19 18:25:28 +08:00
parent 7fa1b08d50
commit da593794f9
1 changed files with 7 additions and 1 deletions

View File

@ -29,3 +29,9 @@ def fire_bullet(ai_settings, screen, ship, bullets):
if len(bullets) < ai_settings.bullets_allowed:
new_bullet = Bullet(ai_settings, screen, ship)
bullets.add(new_bullet)
def check_keyup_events(event, ship):
"""响应松开"""
if event.key == pygame.K_RIGHT:
ship.moving_right = False