private void loadEnemyInfo() { TextAsset jsonText = Resources.Load("EnemyConf") as TextAsset; JObject root = JObject.Parse(jsonText.text); foreach (var info in root) { string name = info.Key; JObject jObj = (JObject)info.Value; TankSchematic schem = JSONUtility.LoadTankSchematic(jObj.Value <JObject>("Tank")); enemyInfoDict.Add(name, new EnemyInfo(name, schem)); } }
private void loadPlayerTankSchematic(JObject root) { TankSchematic = JSONUtility.LoadTankSchematic(root.Value <JObject>("Tank")); }