예제 #1
0
    void ImportEvents()
    {
        JsonData planetEvents = JsonMapper.ToObject(eventsText.text);

        for (int i = 0; i < planetEvents["events"].Count; i++)
        {
            // create a new PlanetEvent with EventCriteria and effects
            eventsManager.AddPlanetEvent(planetEvents["events"][i].ToJson(), i, planetEvents["events"].Count);
        }
    }