更新 'ship'

This commit is contained in:
201110504 2021-06-23 22:04:26 +08:00
parent d47bb26dba
commit f057ae59c4
1 changed files with 3 additions and 1 deletions

4
ship
View File

@ -1,10 +1,12 @@
import pygame
from pygame.sprite import Sprite
class Ship:
class Ship(Sprite):
"""管理飞船的类"""
def __init__(self, ai_game):
"""初始化飞船并设置其初始位置"""
super().__init__()
self.screen = ai_game.screen
self.settings = ai_game.settings
self.screen_rect = ai_game.screen.get_rect()