资源简介

飞机大战资源素材及完整代码,包含飞机大战所需的图片和音乐素材及完整的实现代码。

资源截图

代码片段和文件信息

import pygame
import sys
import math
import os
import copy
import random

# 界面图片
startImgs = [
    pygame.transform.scale(pygame.image.load(‘image/startImgs/back.jpg‘) (506 900))
    pygame.image.load(‘image/startImgs/start.png‘)
    pygame.image.load(‘image/startImgs/name.png‘)
    pygame.image.load(‘image/startImgs/loading.png‘)
    pygame.transform.scale(pygame.image.load(‘image/startImgs/back2.jpg‘) (506 900))
    pygame.image.load(‘image/startImgs/endName.png‘)
    pygame.image.load(‘image/startImgs/start2.png‘)
]

# 按钮背景图片
buttonImgs = [
    pygame.image.load(‘image/buttonImgs/ring1.png‘)
    pygame.image.load(‘image/buttonImgs/ring2.png‘)
]

# 蓝色飞船图片
shipBlue = [
    pygame.image.load(‘image/shipBlue/ship1.png‘)
    pygame.image.load(‘image/shipBlue/ship2.png‘)
    pygame.image.load(‘image/shipBlue/ship3.png‘)
    pygame.image.load(‘image/shipBlue/ship4.png‘)
    pygame.image.load(‘image/shipBlue/ship5.png‘)
    pygame.image.load(‘image/shipBlue/ship6.png‘)
    pygame.image.load(‘image/shipBlue/ship7.png‘)
    pygame.image.load(‘image/shipBlue/ship8.png‘)
    pygame.image.load(‘image/shipBlue/ship9.png‘)
    pygame.image.load(‘image/shipBlue/ship9.png‘)
    pygame.image.load(‘image/shipBlue/ship8.png‘)
    pygame.image.load(‘image/shipBlue/ship7.png‘)
    pygame.image.load(‘image/shipBlue/ship6.png‘)
    pygame.image.load(‘image/shipBlue/ship5.png‘)
    pygame.image.load(‘image/shipBlue/ship4.png‘)
    pygame.image.load(‘image/shipBlue/ship3.png‘)
    pygame.image.load(‘image/shipBlue/ship2.png‘)
    pygame.image.load(‘image/shipBlue/ship1.png‘)
]

# 红色飞船图片
shipRed = [
    pygame.image.load(‘image/shipRed/ship11.png‘)
    pygame.image.load(‘image/shipRed/ship12.png‘)
    pygame.image.load(‘image/shipRed/ship13.png‘)
    pygame.image.load(‘image/shipRed/ship01.png‘)
    pygame.image.load(‘image/shipRed/ship02.png‘)
    pygame.image.load(‘image/shipRed/ship03.png‘)
]

# 子弹图片
bulletImgs = [
    pygame.image.load(‘image/bulletImgs/bullet3.png‘)
]
bulletList = []

# 敌机图片
enemyImgs = [
    pygame.image.load(‘image/enemyImgs/enemy11.png‘)
    pygame.image.load(‘image/enemyImgs/enemy22.png‘)
    pygame.image.load(‘image/enemyImgs/enemy3.png‘)
    pygame.image.load(‘image/enemyImgs/enemy4.png‘)
]
enemy1Imgs = [
    pygame.image.load(‘image/enemy1/enemy11.png‘)
    pygame.image.load(‘image/enemy1/enemy12.png‘)
    pygame.image.load(‘image/enemy1/enemy13.png‘)
    pygame.image.load(‘image/enemy1/enemy14.png‘)
    pygame.image.load(‘image/enemy1/enemy15.png‘)
]
enemy2Imgs = [
    pygame.image.load(‘image/enemy2/enemy21.png‘)
    pygame.image.load(‘image/enemy2/enemy22.png‘)
    pygame.image.load(‘image/enemy2/enemy23.png‘)
    pygame.image.load(‘image/enemy2/enemy24.png‘)
    pygame.image.load(‘image/enemy2/enemy25.png‘)
]
enemy3Imgs = [
    pygame.image.load(‘image/enemy3/enemy31.png‘)
    pygame.image.load(‘image/enem

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-13 09:04  plane\
     目录           0  2018-08-08 10:23  plane\.idea\
     目录           0  2018-08-08 10:21  plane\.idea\inspectionProfiles\
     文件         128  2018-08-08 10:21  plane\.idea\inspectionProfiles\profiles_settings.xml
     文件         262  2018-08-08 10:21  plane\.idea\modules.xml
     文件         325  2018-08-08 10:23  plane\.idea\plane.iml
     文件        1206  2018-08-08 10:21  plane\.idea\workspace.xml
     目录           0  2018-08-10 19:25  plane\font\
     文件       49023  2017-07-01 07:34  plane\font\font1.ttf
     文件      151376  2016-11-03 18:50  plane\font\font10.ttf
     文件       74012  1998-07-14 13:42  plane\font\font2.TTF
     文件       62988  2016-11-09 13:39  plane\font\font3.ttf
     文件       21868  1993-09-08 16:46  plane\font\font4.TTF
     文件       29256  2005-03-01 20:59  plane\font\font5.TTF
     文件      103472  2012-03-18 15:37  plane\font\font6.TTF
     文件      279216  2017-02-14 17:06  plane\font\font7.ttf
     文件       79460  2016-11-22 16:42  plane\font\font8.ttf
     文件       70944  2004-12-25 10:45  plane\font\font9.ttf
     目录           0  2018-08-13 09:01  plane\image\
     目录           0  2018-08-11 17:48  plane\image\award\
     目录           0  2018-08-11 15:16  plane\image\award1\
     文件       20603  2018-08-11 15:12  plane\image\award1\award11.png
     文件       20615  2018-08-11 15:13  plane\image\award1\award12.png
     文件       20652  2018-08-11 15:14  plane\image\award1\award13.png
     文件       20661  2018-08-11 15:14  plane\image\award1\award14.png
     文件       20548  2018-08-11 15:14  plane\image\award1\award15.png
     目录           0  2018-08-11 17:41  plane\image\award2\
     文件       24465  2018-08-11 17:39  plane\image\award2\award21.png
     文件       24403  2018-08-11 17:40  plane\image\award2\award22.png
     文件       24348  2018-08-11 17:40  plane\image\award2\award23.png
     文件       24118  2018-08-11 17:41  plane\image\award2\award24.png
............此处省略96个文件信息

评论

共有 条评论