多场景来回切换版本 #3

Merged
chicrobot merged 21 commits from feature-mutiple-scene into main 2026-07-27 23:52:22 +08:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 805704f0e5 - Show all commits

No files matched your search

+5 -1
View File
@@ -6,7 +6,10 @@
# Datetime: 2026/7/25 下午10:44
# Description:
# ---------------------------------------------------------------------------
import os
import pygame
from src.config.game_config import data_path
# 初始化pygame
pygame.init()
@@ -22,7 +25,8 @@ screen = pygame.display.set_mode(size)
pygame.display.set_caption("New_game")
# 播放并循环音乐
pygame.mixer_music.load(r'D:\python_project\Game_project\file\vespidaze-upbeat-rpg-battle-460971.mp3')
data_path = data_path()
pygame.mixer_music.load(os.path.join(data_path, "vespidaze-upbeat-rpg-battle-460971.mp3"))
pygame.mixer_music.play(-1)
# 状态值