添加 '让外星人群里移动'

This commit is contained in:
206530234 2021-06-18 23:05:28 +08:00
parent 573b812ea5
commit 93b522647c
1 changed files with 19 additions and 0 deletions

19
让外星人群里移动 Normal file
View File

@ -0,0 +1,19 @@
import random
class spaceInvader(pygame.sprite.Sprite):
def __init__(self):
self.image = pygame.image.load("spaceInvader.png")
self.x = 200
self.y = 390
self.shots = []
def handle_keys(self):
key = pygame.key.get_pressed()
dist = 5