public JSONInStream ContentOptional(string tag, ref Rect value) { // null ? IJSONFieldValue fieldValue = node.GetField(tag); if (fieldValue == null) { return(this); } if (fieldValue.GetType() == typeof(JSONNullFieldValue)) { value = new Rect(); return(this); } // unpack values float[] fs = new float[4]; List(tag, delegate(int i, JSONInStream stream){ float f; stream.Content(out f); fs[i] = f; }); value = new Rect(fs[0], fs[1], fs[2], fs[3]); return(this); }
public JSONInStream Content(int idx, out Rect value) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) IJSONFieldValue field = node.GetField(idx); if (field.GetType() == typeof(JSONNullFieldValue)) { value = default(Rect); return(this); } float[] fs = new float[4]; List(idx, delegate(int i, JSONInStream stream) { stream.Content(out float value2); fs[i] = value2; }); value._002Ector(fs[0], fs[1], fs[2], fs[3]); return(this); }
public JSONInStream Content(string tag, out Quaternion value) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) IJSONFieldValue field = node.GetField(tag); if (field.GetType() == typeof(JSONNullFieldValue)) { value = Quaternion.get_identity(); return(this); } float[] fs = new float[4]; List(tag, delegate(int i, JSONInStream stream) { stream.Content(out float value2); fs[i] = value2; }); value._002Ector(fs[0], fs[1], fs[2], fs[3]); return(this); }
public JSONInStream Content(int idx, out Color value) { // null ? IJSONFieldValue fieldValue = node.GetField(idx); if (fieldValue.GetType() == typeof(JSONNullFieldValue)) { value = Color.white; return(this); } // unpack values float[] fs = new float[4]; List(idx, delegate(int i, JSONInStream stream){ float f; stream.Content(out f); fs[i] = f; }); value = new Color(fs[0], fs[1], fs[2], fs[3]); return(this); }
// QUATERNION public JSONInStream Content(string tag, out Quaternion value) { // null ? IJSONFieldValue fieldValue = node.GetField(tag); if (fieldValue.GetType() == typeof(JSONNullFieldValue)) { value = Quaternion.identity; return(this); } // unpack values float[] fs = new float[4]; List(tag, delegate(int i, JSONInStream stream){ float f; stream.Content(out f); fs[i] = f; }); value = new Quaternion(fs[0], fs[1], fs[2], fs[3]); return(this); }
// VECTOR3 public JSONInStream Content(string tag, out Vector3 value) { // null ? IJSONFieldValue fieldValue = node.GetField(tag); if (fieldValue.GetType() == typeof(JSONNullFieldValue)) { value = Vector3.zero; return(this); } // unpack values float[] fs = new float[3]; List(tag, delegate(int i, JSONInStream stream){ float f; stream.Content(out f); fs[i] = f; }); value = new Vector3(fs[0], fs[1], fs[2]); return(this); }
public JSONInStream ContentOptional(string tag, ref Color value) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) IJSONFieldValue field = node.GetField(tag); if (field == null) { return(this); } if (field.GetType() == typeof(JSONNullFieldValue)) { value = Color.get_white(); return(this); } float[] fs = new float[4]; List(tag, delegate(int i, JSONInStream stream) { stream.Content(out float value2); fs[i] = value2; }); value._002Ector(fs[0], fs[1], fs[2], fs[3]); return(this); }