parent
253725899d
commit
872c5aa054
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Black">
|
||||||
|
<option name="sdkName" value="Python 3.12 (jiemian_test)" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (test1)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/xpy_game.iml" filepath="$PROJECT_DIR$/.idea/xpy_game.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.12 (test1)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -1,2 +1,11 @@
|
|||||||
# xpy_game
|
# xpy_game
|
||||||
|
游戏介绍:
|
||||||
|
游戏开始时,一群外星 人出现在天空中,他们在屏幕中向下移动。玩家的任务是射杀这些外星人。
|
||||||
|
玩家将所有外星人都消灭干净后,将出现一群新的外星人,他们移动的速度更快。只要有外星人撞到了玩家的飞船或到达了屏幕底部,玩家就损失一艘飞船。
|
||||||
|
玩家损失三艘飞船后,游戏结束。
|
||||||
|
|
||||||
|
玩法介绍:
|
||||||
|
左右键移动
|
||||||
|
空格键发射子弹
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,24 +0,0 @@
|
|||||||
import pygame
|
|
||||||
from pygame.examples.video import x, y
|
|
||||||
|
|
||||||
|
|
||||||
class Explosion:
|
|
||||||
def __init__(self, ai_setting, screen):
|
|
||||||
self.screen = screen
|
|
||||||
self.image = pygame.image.load('images/explosion.png')
|
|
||||||
self.rect = self.image.get_rect()
|
|
||||||
self.visible = False
|
|
||||||
self.stop_time = ai_setting.explosion_time
|
|
||||||
self.stop = ai_setting.explosion_time
|
|
||||||
def create(self):
|
|
||||||
self.visible = True
|
|
||||||
self.stop = self.stop_time
|
|
||||||
self.rect.centerx = x
|
|
||||||
self.rect.centery = y
|
|
||||||
def update(self):
|
|
||||||
self.stop -= 1
|
|
||||||
if self.stop == 0:
|
|
||||||
self.visible = False
|
|
||||||
def display(self):
|
|
||||||
if self.visible:
|
|
||||||
self.screen.blit(self.image, self.rect)
|
|
@ -1,3 +1,3 @@
|
|||||||
V240
|
V0
|
||||||
p0
|
p0
|
||||||
.
|
.
|
Before Width: | Height: | Size: 1.8 MiB |
After Width: | Height: | Size: 833 KiB |
Before Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 18 KiB |
Loading…
Reference in new issue