1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-30 07:12:29 +08:00

feat(游戏结束): 添加死亡原因显示功能

- 新增JsonTool工具类用于解析JSON文件
- 在GameOver面板中添加死亡原因显示标签
- 添加死亡原因JSON数据文件
- 在GameRule中加载死亡原因数据
This commit is contained in:
2025-09-07 13:18:29 +08:00
parent 1d9c3fc466
commit b186382080
6 changed files with 165 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
class_name JsonTool
static func parseJson(filePath: String):
var file = FileAccess.open(filePath, FileAccess.READ)
var json = file.get_as_text()
file.close()
var jsonObj = JSON.new()
jsonObj.parse(json)
return jsonObj.data