From 6fb204d494b897907d655b5752196983a82ceba2 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sat, 13 May 2023 15:20:20 +0800 Subject: *misc --- WorldlineKeepers/Assets/Scripts/Data/DataManager.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'WorldlineKeepers/Assets/Scripts/Data/DataManager.cs') diff --git a/WorldlineKeepers/Assets/Scripts/Data/DataManager.cs b/WorldlineKeepers/Assets/Scripts/Data/DataManager.cs index a3d1257..3bb9ef2 100644 --- a/WorldlineKeepers/Assets/Scripts/Data/DataManager.cs +++ b/WorldlineKeepers/Assets/Scripts/Data/DataManager.cs @@ -1,3 +1,4 @@ +using LitJson; using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; @@ -11,6 +12,7 @@ namespace WK.Data private Dictionary m_CharacterStatsMetadata = new Dictionary(); private Dictionary m_BuffMetadata = new Dictionary(); + private Dictionary m_CharacterMetadata = new Dictionary(); public CharacterStatsMetadata GetCharacterStats(string uid) { @@ -35,6 +37,7 @@ namespace WK.Data public void Load() { LoadDefaultStats(); + LoadDefaultCharacters(); } private void LoadDefaultStats() @@ -47,6 +50,16 @@ namespace WK.Data } } + private void LoadDefaultCharacters() + { + TextAsset text = ResourceManager.Instance.LoadAsset(StaticDefine.RoninPath); + CharacterMetadata metadata = JsonMapper.ToObject(text.text); + if(metadata != null) + { + m_CharacterMetadata.Add(metadata.uid, metadata); + } + } + } } \ No newline at end of file -- cgit v1.1-26-g67d0