飞机初始化、加载飞机资源

This commit is contained in:
206530332 2021-06-15 14:22:13 +08:00
parent d7935642ad
commit 33f9097cc9
1 changed files with 13 additions and 0 deletions

13
heroplane.py Normal file
View File

@ -0,0 +1,13 @@
import pygame
from bullet import *
# pygame.mixer.init()
# 飞机
class HeroPlane(object):
# 飞机初始化
def __init__(self, scene):
# 加载飞机资源
self.image = pygame.image.load("./images/hero/hero.png")
self.mask = pygame.mask.from_surface(self.image)