Example #1
0
 internal static GameData GetInstance()
 {
     if (instance == null)
     {
         instance = new GameData();
     }
     return instance;
 }
Example #2
0
 internal static void CreateWithJson(string mapJsonPath)
 {
     using (StreamReader sr = new StreamReader(mapJsonPath))
     {
         string jsonTxt = sr.ReadToEnd();
         instance = JsonConvert.DeserializeObject(jsonTxt, typeof(GameData)) as GameData;
     }
 }