Ejemplo n.º 1
0
 public void PopulateFromJson(JObject jsonObject)
 {
     m_playingOrder        = Serialization.JsonTokenValue <int>(jsonObject, "playingOrder", 0);
     m_actionTargets       = IAIActionTargetsUtils.FromJsonProperty(jsonObject, "actionTargets");
     m_moveIfNoValidTarget = AIMovementDefinition.FromJsonProperty(jsonObject, "moveIfNoValidTarget");
     m_moveIfNoTarget      = AIMovementDefinition.FromJsonProperty(jsonObject, "moveIfNoTarget");
 }
Ejemplo n.º 2
0
        public static AIMovementDefinition FromJsonProperty(JObject jsonObject, string propertyName, AIMovementDefinition 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()));
        }