This commit is contained in:
parent
f73e7531cb
commit
7fe375a190
|
@ -41,3 +41,11 @@ class Bullet(Sprite):
|
|||
"""在飞船所处的位置创建一个子弹对象"""
|
||||
super(BossBullet, self).__init__()
|
||||
self.screen = screen
|
||||
|
||||
# 在boss底部中央处创建一个表示子弹的矩形,再设置正确的位置
|
||||
self.rect = pygame.Rect(0, 0, ai_settings.bossbullet_width,
|
||||
ai_settings.bossbullet_height)
|
||||
self.rect.x = bossalien.x
|
||||
self.rect.y = bossalien.rect.bottom
|
||||
self.width = ai_settings.bossbullet_width
|
||||
self.height = ai_settings.bossbullet_height
|
Loading…
Reference in New Issue