This commit is contained in:
2022-04-18 00:13:14 +08:00
parent 9cfd26e75f
commit a364ed7a78
187 changed files with 2030 additions and 15 deletions

View File

@@ -1,6 +1,12 @@
# Plane Fighting
## 一个跨平台的简易"飞机大战"程序
## 基于 Python & PyGame 运行
## 图标库来自 IconFont
## 相应的版权归作者所有
## 本目录中其他所有的文件根据 GPL 3.0 协议开源
# Plane Fighting (plane_fighting)
## 简介
一个跨平台的简易"飞机大战"小游戏
## 支持
基于Python & PyGame 运行
可通过 Buildozer 打包为移动应用
## 协议
图标库(./images/)来自 IconFont
音效库(./sound/)来自网络
字体库(./font)来自 Ubuntu
相应的版权归作者所有
本目录中其他所有的源代码文件根据 GPL 3.0 协议开源

0
Plane_Fighting/buildozer.spec Executable file → Normal file
View File

1
Plane_Fighting/bullet.py Executable file → Normal file
View File

@@ -1,4 +1,5 @@
import pygame,os
abspath = os.getcwd() + "/"
class Bullet1(pygame.sprite.Sprite):
def __init__(self, position):

0
Plane_Fighting/enemy.py Executable file → Normal file
View File

0
Plane_Fighting/font/font-2.ttf Executable file → Normal file
View File

0
Plane_Fighting/font/font.ttf Executable file → Normal file
View File

0
Plane_Fighting/images/again.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Plane_Fighting/images/background.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

0
Plane_Fighting/images/bomb.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
Plane_Fighting/images/bomb_supply.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
Plane_Fighting/images/bullet1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 99 B

0
Plane_Fighting/images/bullet2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 99 B

0
Plane_Fighting/images/bullet_supply.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

0
Plane_Fighting/images/enemy1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

0
Plane_Fighting/images/enemy1_down1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
Plane_Fighting/images/enemy1_down2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
Plane_Fighting/images/enemy1_down3.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
Plane_Fighting/images/enemy1_down4.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
Plane_Fighting/images/enemy2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
Plane_Fighting/images/enemy2_down1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
Plane_Fighting/images/enemy2_down2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
Plane_Fighting/images/enemy2_down3.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
Plane_Fighting/images/enemy2_down4.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
Plane_Fighting/images/enemy2_hit.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_down1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_down2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_down3.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_down4.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_down5.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_down6.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_hit.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
Plane_Fighting/images/enemy3_n1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

0
Plane_Fighting/images/enemy3_n2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

0
Plane_Fighting/images/gameover.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
Plane_Fighting/images/icon.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
Plane_Fighting/images/life.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 118 B

0
Plane_Fighting/images/loading.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

0
Plane_Fighting/images/me1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
Plane_Fighting/images/me2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
Plane_Fighting/images/me_destroy_1.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Plane_Fighting/images/me_destroy_2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Plane_Fighting/images/me_destroy_3.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Plane_Fighting/images/me_destroy_4.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Plane_Fighting/images/pause_nor.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 868 B

After

Width:  |  Height:  |  Size: 868 B

0
Plane_Fighting/images/pause_pressed.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 868 B

After

Width:  |  Height:  |  Size: 868 B

0
Plane_Fighting/images/resume_nor.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 790 B

After

Width:  |  Height:  |  Size: 790 B

0
Plane_Fighting/images/resume_pressed.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 790 B

After

Width:  |  Height:  |  Size: 790 B

0
Plane_Fighting/main.py Executable file → Normal file
View File

0
Plane_Fighting/myplane.py Executable file → Normal file
View File

8
Plane_Fighting/pyinstaller.spec Executable file → Normal file
View File

@@ -4,10 +4,10 @@
block_cipher = None
a = Analysis(['main.py'],
a = Analysis(['main.py','bullet.py','enemy.py','myplane.py','supply.py'],
pathex=[],
binaries=[(./images/*.png, images)]
datas=[],
binaries=[("font", "images", "sound")]
datas=["record.dat"],
hiddenimports=[],
hookspath=[],
hooksconfig={},
@@ -26,7 +26,7 @@ exe = EXE(pyz,
a.zipfiles,
a.datas,
[],
name='main',
name='Plane Fighting',
debug=False,
bootloader_ignore_signals=False,
strip=False,

0
Plane_Fighting/record.dat Executable file → Normal file
View File

0
Plane_Fighting/sound/bullet.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/button.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/enemy1_down.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/enemy2_down.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/enemy3_down.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/enemy3_flying.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/game_music.ogg Executable file → Normal file
View File

0
Plane_Fighting/sound/get_bomb.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/get_bullet.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/loading_game.ogg Executable file → Normal file
View File

0
Plane_Fighting/sound/me_down.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/supply.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/upgrade.wav Executable file → Normal file
View File

0
Plane_Fighting/sound/use_bomb.wav Executable file → Normal file
View File

7
Plane_Fighting/supply.py Executable file → Normal file
View File

@@ -1,11 +1,12 @@
import pygame
import pygame,os
from random import *
abspath = os.getcwd() + "/"
class Bullet_Supply(pygame.sprite.Sprite):
def __init__(self, bg_size):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.image.load("images/bullet_supply.png").convert_alpha()
self.image = pygame.image.load(abspath + "images/bullet_supply.png").convert_alpha()
self.rect = self.image.get_rect()
self.width, self.height = bg_size[0], bg_size[1]
self.rect.left, self.rect.bottom = \
@@ -29,7 +30,7 @@ class Bomb_Supply(pygame.sprite.Sprite):
def __init__(self, bg_size):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.image.load("images/bomb_supply.png").convert_alpha()
self.image = pygame.image.load(abspath + "images/bomb_supply.png").convert_alpha()
self.rect = self.image.get_rect()
self.width, self.height = bg_size[0], bg_size[1]
self.rect.left, self.rect.bottom = \