Beispiel #1
0
    public static bool BuildFromJSON(string filename)
    {
        JSONNode rootNode = JSONUtils.ParseJSON(filename);

        if (rootNode != null)
        {
            return(TileMapping.BuildFromJSON(rootNode));
        }

        return(false);
    }
Beispiel #2
0
    static EnemiesInfo()
    {
        string filename = "enemiesInfo";

        JSONNode rootNode = JSONUtils.ParseJSON(filename);

        if (rootNode == null)
        {
            return;
        }

        version = rootNode["version"].Value;
        JSONNode enemiesInfoJSON = rootNode["enemiesInfo"];

        foreach (JSONNode node in enemiesInfoJSON.Childs)
        {
            EnemyInfo enemyInfo = new EnemyInfo(node);
            m_enemiesInfo[enemyInfo.m_name] = enemyInfo;
        }
    }