From 96f8595c164154e2f34af68eabf98ac13bf4589e Mon Sep 17 00:00:00 2001 From: 206530113 <1412884178@qq.com> Date: Thu, 17 Jun 2021 15:11:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 子弹类.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 子弹类.txt diff --git a/子弹类.txt b/子弹类.txt new file mode 100644 index 0000000..adaa492 --- /dev/null +++ b/子弹类.txt @@ -0,0 +1,9 @@ +# 子弹类 +# 属性 坐标 速度 图片 +class Bullet(pygame.sprite.Sprite): + + def __init__(self, screen, x, y): + pygame.sprite.Sprite.__init__(self) + # 图片 + self.image = pygame.image.load('./feiji/bullet.png') + self.rect = self.image.get_rect() # rect属性:矩形 \ No newline at end of file