更新 'ship'
This commit is contained in:
parent
d47bb26dba
commit
f057ae59c4
4
ship
4
ship
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue