更新 'ship.py'
This commit is contained in:
parent
2e23796c44
commit
ce997db95a
4
ship.py
4
ship.py
|
@ -41,3 +41,7 @@ class Ship(Sprite):
|
|||
self.centery -= self.ai_settings.ship_speed_factor
|
||||
if self.moving_down and self.rect.bottom < self.screen_rect.bottom:
|
||||
self.centery += self.ai_settings.ship_speed_factor
|
||||
|
||||
# 根据self.center更新rect对象
|
||||
self.rect.centerx = self.center
|
||||
self.rect.centery = self.centery
|
||||
|
|
Loading…
Reference in New Issue