1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-02 09:21:54 +08:00

feat(保存系统): 实现游戏存档功能

添加SaveEngine类用于处理游戏存档的序列化、加载和应用
修改GameBusManager在游戏重启时自动保存和加载存档
扩展JsonTool功能以支持文件解析和字符串序列化
更新StarterPanel添加教程观看状态保存
This commit is contained in:
2026-05-09 21:25:27 +08:00
parent d739771c1a
commit b1cb089705
6 changed files with 44 additions and 5 deletions
+2
View File
@@ -32,6 +32,7 @@ var historyStack
static var GAMEMODE_MAP_WAVE = [Wave.WAVE_NORMAL, Wave.WAVE_BOSSRUSH, Wave.WAVE_MOWING, Wave.WAVE_TESTBOSS]
static var START_CHARACTERS = ["MuyangDog", "Lynx", "HCN"]
static var buildingShader: bool = true
static var tutorialWatched: bool = false
static var selectingFeed: bool = true
static var selectedCharacter: String = MathTool.randomChoiceFrom(START_CHARACTERS)
@@ -100,6 +101,7 @@ func _ready():
func(on: bool):
useTutorialBtn.text = "观看" if on else "跳过"
)
useTutorialBtn.button_pressed = tutorialWatched
multiplayer.connection_failed.connect(
func():
setState(MultiplayerState.ConnectionState.DISCONNECTED)