Beispiel #1
0
    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));
        }
    }
Beispiel #2
0
 private void loadPlayerTankSchematic(JObject root)
 {
     TankSchematic = JSONUtility.LoadTankSchematic(root.Value <JObject>("Tank"));
 }