public override void PopulateFromJson(JObject jsonObject) { base.PopulateFromJson(jsonObject); m_cellCount = DynamicValue.FromJsonProperty(jsonObject, "cellCount"); m_direction = MoveVector.FromJsonProperty(jsonObject, "direction"); m_movementType = (MovementType)Serialization.JsonTokenValue <int>(jsonObject, "movementType", 6); m_canPassThroughEntities = Serialization.JsonTokenValue <bool>(jsonObject, "canPassThroughEntities", false); }
public static MoveVector FromJsonProperty(JObject jsonObject, string propertyName, MoveVector 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())); }