Ejemplo n.º 1
0
        public override void PopulateFromJson(JObject jsonObject)
        {
            base.PopulateFromJson(jsonObject);
            m_applicationTargetSelector = ITargetSelectorUtils.FromJsonProperty(jsonObject, "applicationTargetSelector");
            JArray val = Serialization.JsonArray(jsonObject, "applicationEndTriggers");

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

            m_executionStartTriggers = new List <EffectTrigger>((val2 != null) ? val2.get_Count() : 0);
            if (val2 != null)
            {
                foreach (JToken item2 in val2)
                {
                    m_executionStartTriggers.Add(EffectTrigger.FromJsonToken(item2));
                }
            }
            m_condition = EffectCondition.FromJsonProperty(jsonObject, "condition");
        }
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_condition = EffectCondition.FromJsonProperty(jsonObject, "condition");
     m_executionTargetSelector = ITargetSelectorUtils.FromJsonProperty(jsonObject, "executionTargetSelector");
     m_groupExecutionOnTargets = Serialization.JsonTokenValue <bool>(jsonObject, "groupExecutionOnTargets", false);
 }
Ejemplo n.º 3
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_condition = EffectCondition.FromJsonProperty(jsonObject, "condition");
     m_ifTrue    = DynamicValue.FromJsonProperty(jsonObject, "ifTrue");
     m_ifFalse   = DynamicValue.FromJsonProperty(jsonObject, "ifFalse");
 }
Ejemplo n.º 4
0
        public override void PopulateFromJson(JObject jsonObject)
        {
            base.PopulateFromJson(jsonObject);
            JArray val = Serialization.JsonArray(jsonObject, "conditions");

            m_conditions = new List <EffectCondition>((val != null) ? val.get_Count() : 0);
            if (val != null)
            {
                foreach (JToken item in val)
                {
                    m_conditions.Add(EffectCondition.FromJsonToken(item));
                }
            }
        }
Ejemplo n.º 5
0
 public void PopulateFromJson(JObject jsonObject)
 {
     m_condition       = EffectCondition.FromJsonProperty(jsonObject, "condition");
     m_selectorIfTrue  = ISelectorForCastUtils.FromJsonProperty(jsonObject, "selectorIfTrue");
     m_selectorIfFalse = ISelectorForCastUtils.FromJsonProperty(jsonObject, "selectorIfFalse");
 }
Ejemplo n.º 6
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_condition = EffectCondition.FromJsonProperty(jsonObject, "condition");
 }
Ejemplo n.º 7
0
        public static EffectCondition FromJsonProperty(JObject jsonObject, string propertyName, EffectCondition defaultValue = null)
        {
            //IL_0011: Unknown result type (might be due to invalid IL or missing references)
            //IL_0018: Invalid comparison between Unknown and I4
            JProperty val = jsonObject.Property(propertyName);

            if (val == null || (int)val.get_Value().get_Type() == 10)
            {
                return(defaultValue);
            }
            return(FromJsonToken(val.get_Value()));
        }