飞机大战 #coding=utf-8 import pygame from pygame.locals import * import time import random class Base(object): def __init__(self,x,y,screen,image_name): self.x=x self.y=y self.screen=screen self.image=pygame.image.load(image_name).convert() class BaseBul…
import pygame from pygame.locals import * from pygame.sprite import Sprite import random import time pygame.init()#游戏初始化 pygame.mixer.init()#混音器初始化 #游戏背景音乐 pygame.mixer.music.load("./sound/game_music.wav") pygame.mixer.music.set_volume(0.2) #子弹发…