Pygame: problems with shooting in Space Invaders [duplicate]
问题 This question already has answers here : How can i shoot a bullet with space bar? (1 answer) How do I stop more than 1 bullet firing at once? (1 answer) Closed 26 days ago . I've been attempting to make a Space Invaders clone in pygame. I decided to write it so that the bullet shot from the player's ship can only be fired again when it leaves the screen but I've not been capable of doing so. How do I do it? import pygame pygame.init() screen_size = (500, 500) ship_size = (50, 50) x, y = 250,