コード例 #1
0
        public override void PopulateFromJson(JObject jsonObject)
        {
            base.PopulateFromJson(jsonObject);
            m_eventsInvalidatingCost    = Serialization.JsonArrayAsList <EventCategory>(jsonObject, "eventsInvalidatingCost");
            m_eventsInvalidatingCasting = Serialization.JsonArrayAsList <EventCategory>(jsonObject, "eventsInvalidatingCasting");
            m_spawnLocation             = ICoordSelectorUtils.FromJsonProperty(jsonObject, "spawnLocation");
            JArray val = Serialization.JsonArray(jsonObject, "cost");

            m_cost = new List <Cost>((val != null) ? val.get_Count() : 0);
            if (val != null)
            {
                foreach (JToken item in val)
                {
                    m_cost.Add(Cost.FromJsonToken(item));
                }
            }
            JArray val2 = Serialization.JsonArray(jsonObject, "spells");

            m_spells = new List <SpellOnSpawnWithDestination>((val2 != null) ? val2.get_Count() : 0);
            if (val2 != null)
            {
                foreach (JToken item2 in val2)
                {
                    m_spells.Add(SpellOnSpawnWithDestination.FromJsonToken(item2));
                }
            }
            m_autoResurrect = Serialization.JsonTokenValue <bool>(jsonObject, "autoResurrect", false);
        }
コード例 #2
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_first  = ICoordSelectorUtils.FromJsonProperty(jsonObject, "first");
     m_second = ICoordSelectorUtils.FromJsonProperty(jsonObject, "second");
 }