Request() public static method

public static Request ( string function, JSON, parameters = null, CrownCallbackJSON callback = null, CrownCallbackJSON internalCallback = null ) : IEnumerator
function string
parameters JSON,
callback CrownCallbackJSON
internalCallback CrownCallbackJSON
return IEnumerator
示例#1
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)));
    }
示例#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)));
    }