加入金银向日葵
This commit is contained in:
parent
ead7826d80
commit
94701fe413
@ -17,7 +17,7 @@
|
||||
* 支持分波生成僵尸
|
||||
* 支持“关卡进程”进度条显示
|
||||
* 夜晚模式支持墓碑以及从墓碑生成僵尸
|
||||
* 含有泳池的模式也支持在最后一波时从泳池中自动冒出僵尸
|
||||
* 含有泳池的模式支持在最后一波时从泳池中自动冒出僵尸
|
||||
* 支持保存进度
|
||||
* Windows下默认进度文件的保存路径为`~\AppData\Roaming\wszqkzqk.dev\pypvz\userdata.json`
|
||||
* 其他操作系统为`~/.config/wszqkzqk.dev/pypvz/userdata.json`
|
||||
|
||||
BIN
resources/graphics/Screen/sunflowerGolden.png
Normal file
BIN
resources/graphics/Screen/sunflowerGolden.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
BIN
resources/graphics/Screen/sunflowerSilver.png
Normal file
BIN
resources/graphics/Screen/sunflowerSilver.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
@ -66,6 +66,9 @@ RESTART_BUTTON = 'restartButton'
|
||||
MAINMENU_BUTTON = 'mainMenuButton'
|
||||
LITTLEGAME_BUTTON = 'littleGameButton'
|
||||
OPTION_BUTTON = 'optionButton'
|
||||
# 金银向日葵奖杯
|
||||
SILVER_SUNFLOWER = 'sunflowerSilver'
|
||||
GOLDEN_SUNFLOWER = 'sunflowerGolden'
|
||||
# 小铲子
|
||||
SHOVEL = 'shovel'
|
||||
SHOVEL_BOX = 'shovelBox'
|
||||
|
||||
@ -15,6 +15,7 @@ class Menu(tool.State):
|
||||
self.setupBackground()
|
||||
self.setupOptions()
|
||||
self.setupOptionMenu()
|
||||
self.setupSunflowerTrophy()
|
||||
pg.mixer.music.stop()
|
||||
pg.mixer.music.load(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))) ,"resources", "music", "intro.opus"))
|
||||
pg.mixer.music.play(-1, 0)
|
||||
@ -196,6 +197,18 @@ class Menu(tool.State):
|
||||
self.return_button_rect.y = 440
|
||||
|
||||
# 音量+、音量-
|
||||
|
||||
def setupSunflowerTrophy(self):
|
||||
# 设置金银向日葵图片信息
|
||||
frame_rect = (0, 0, 157, 269)
|
||||
if self.game_info[c.LEVEL_COMPLETIONS]:
|
||||
if self.game_info[c.LITTLEGAME_COMPLETIONS]:
|
||||
self.sunflower_trophy = tool.get_image_menu(tool.GFX[c.GOLDEN_SUNFLOWER], *frame_rect, c.BLACK)
|
||||
else:
|
||||
self.sunflower_trophy = tool.get_image_menu(tool.GFX[c.SILVER_SUNFLOWER], *frame_rect, c.BLACK)
|
||||
self.sunflower_trophy_rect = self.sunflower_trophy.get_rect()
|
||||
self.sunflower_trophy_rect.x = 0
|
||||
self.sunflower_trophy_rect.y = 300
|
||||
|
||||
def checkOptionButtonClick(self, mouse_pos):
|
||||
x, y = mouse_pos
|
||||
@ -220,6 +233,8 @@ class Menu(tool.State):
|
||||
surface.blit(self.exit_image, self.exit_rect)
|
||||
surface.blit(self.option_button_image, self.option_button_rect)
|
||||
surface.blit(self.littleGame_image, self.littleGame_rect)
|
||||
if self.game_info[c.LEVEL_COMPLETIONS]:
|
||||
surface.blit(self.sunflower_trophy, self.sunflower_trophy_rect)
|
||||
|
||||
# 点到冒险模式后播放动画
|
||||
if self.adventure_clicked:
|
||||
|
||||
@ -66,6 +66,8 @@ class Control():
|
||||
self.game_info = c.INIT_USERDATA.copy() # 内部全是不可变对象,浅拷贝即可
|
||||
# 存档内不包含即时游戏时间信息,需要新建
|
||||
self.game_info[c.CURRENT_TIME] = 0
|
||||
|
||||
# 50为目前的基础帧率,乘以倍率即是游戏帧率
|
||||
self.fps = 50 * self.game_info[c.GAME_RATE]
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user