AddField() public method

public AddField ( bool val ) : void
val bool
return void
示例#1
0
 public static IEnumerator RegisterByName(string name, string password, CrownCallbackJSON callback = null)
 {
     JSON parameters = new JSON();
     parameters.AddField("name", name);
     parameters.AddField("password", password);
     yield return instance.StartCoroutine(Crown.Request("registerByName", parameters, callback, OnLoginByName));
 }
示例#2
0
    public static IEnumerator RegisterByName(string name, string password, CrownCallbackJSON callback = null)
    {
        JSON parameters = new JSON();

        parameters.AddField("name", name);
        parameters.AddField("password", password);
        yield return(instance.StartCoroutine(Crown.Request("registerByName", parameters, callback, OnLoginByName)));
    }
示例#3
0
    /*
     * Login to server and get user main data
     */
    public IEnumerator GetItems(CrownCallbackJSON callback = null)
    {
        JSON parameters = new JSON();

        parameters.AddField("var1", "teeeeeest55555");
        yield return(StartCoroutine(Crown.Request("getPlayerItems", parameters, callback, OnGetItems)));
    }
示例#4
0
 static void MergeRecur(JSON left, JSON right)
 {
     if (right.type == JSON.Type.OBJECT)
     {
         for (int i = 0; i < right.list.Count; i++)
         {
             if (right.keys[i] != null)
             {
                 string key = (string)right.keys[i];
                 JSON   val = (JSON)right.list[i];
                 if (val.type == JSON.Type.ARRAY || val.type == JSON.Type.OBJECT)
                 {
                     if (left.HasField(key))
                     {
                         MergeRecur(left[key], val);
                     }
                     else
                     {
                         left.AddField(key, val);
                     }
                 }
                 else
                 {
                     if (left.HasField(key))
                     {
                         left.SetField(key, val);
                     }
                     else
                     {
                         left.AddField(key, val);
                     }
                 }
             }
         }
     }        // else left.list.Add(right.list);
 }
示例#5
0
	static void MergeRecur(JSON left, JSON right) {
		if(right.type == JSON.Type.OBJECT) {
			for(int i = 0; i < right.list.Count; i++) {
				if(right.keys[i] != null) {
					string key = (string)right.keys[i];
					JSON val = (JSON)right.list[i];
					if(val.type == JSON.Type.ARRAY || val.type == JSON.Type.OBJECT) {
						if(left.HasField(key))
							MergeRecur(left[key], val);
						else
							left.AddField(key, val);
					} else {
						if(left.HasField(key))
							left.SetField(key, val);
						else
							left.AddField(key, val);
					}
				}
			}
		}// else left.list.Add(right.list);
	}
示例#6
0
 /*
  * Login to server and get user main data
  */
 public IEnumerator GetItems(CrownCallbackJSON callback = null)
 {
     JSON parameters = new JSON();
     parameters.AddField("var1", "teeeeeest55555");
     yield return StartCoroutine(Crown.Request("getPlayerItems", parameters, callback, OnGetItems));
 }