上传文件至 ''

This commit is contained in:
206530104 2021-06-23 15:28:30 +08:00
parent de2c373b59
commit 5838e9fda3
1 changed files with 16 additions and 0 deletions

16
super_bullet.py Normal file
View File

@ -0,0 +1,16 @@
import pygame
from bullet import Bullet
class SuperBullet(Bullet):
"""一个对飞船发射的超级子弹进行管理的类"""
def __init__(self, ai_settings, screen, ship):
"""在飞船所处的位置创建一个子弹对象"""
super().__init__(ai_settings, screen, ship)
# 设置超级子弹宽高,颜色及速度
self.rect.width = ai_settings.super_bullet_width
self.rect.height = ai_settings.super_bullet_height
self.color = ai_settings.super_bullet_color
self.speed_factor = ai_settings.super_bullet_speed_factor