This commit is contained in:
206530220 2021-06-19 11:57:34 +08:00
parent e455f416c7
commit 38519ba7f4
1 changed files with 5 additions and 1 deletions

View File

@ -43,4 +43,8 @@ class Ship(Sprite):
self.rect.centery = self.centery
def blitme(self):
self.screen.blit(self.image, self.rect)
self.screen.blit(self.image, self.rect)
def center_ship(self):
"""让飞船在屏幕上居中"""
self.center = self.screen_rect.centerx