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:
@@ -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
|
||||
Reference in New Issue
Block a user