更新 'alien.py'

This commit is contained in:
206530230 2021-06-19 11:16:26 +08:00
parent 171ede9932
commit e3b8e99f23
1 changed files with 3 additions and 0 deletions

View File

@ -14,3 +14,6 @@ class Alien(Sprite):
# 加载外星人图像并设置其rect属性
self.image = pygame.image.load('images/alien.bmp')
self.rect = self.image.get_rect()
# 每个外星人最初都在屏幕左上角附近
self.rect.x = self.rect.width