更新 'ship.py'
This commit is contained in:
parent
ad2d4fe536
commit
3da13c9d10
5
ship.py
5
ship.py
|
@ -28,4 +28,9 @@ class Ship(Sprite):
|
||||||
self.moving_left = False
|
self.moving_left = False
|
||||||
self.moving_up = False
|
self.moving_up = False
|
||||||
self.moving_down = False
|
self.moving_down = False
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
"""根据移动标志调整飞船的位置"""
|
||||||
|
# 更新飞船的center值,而不是rect
|
||||||
|
if self.moving_right and self.rect.right < self.screen_rect.right:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue