예제 #1
0
    public void GetFontOutline(string url, string fontid, string characters)
    {
        // TODO: WE SHALL ONLY OUTPUT A QUERY IF NO SIMILAR QUERY IS RUNNING
        // AND ONLY IF THE MAX NUMBER OF SIMULTANEOUS QUERY HAS NOT BEEN REACHED

        if (!url.EndsWith("/"))
        {
            url = url + "/";
        }
        GameObject go = new GameObject();

        go.transform.parent = transform;
        go.name             = "WWW Query";
        go.AddComponent <TTFTextFontClient>();
        TTFTextFontClient tfc = go.GetComponent <TTFTextFontClient>();

        tfc.url  = url + "outline/" + fontid + "/";
        tfc.form = new WWWForm();
        tfc.form.AddField("userkey", TTFTextServerUserKey);
        tfc.form.AddField("authkey", TTFTextServerAuthKey);
        tfc.form.AddField("requestid", -1);        // unused
        tfc.form.AddField("characters", characters);
        tfc.notifiedObject = gameObject;
        tfc.signal         = "QueryServerForFontListReply";
    }
예제 #2
0
    // QUERY SERVER FOR FONT LIST
    public void QueryServerForFontList(string url)
    {
        if (!url.EndsWith("/"))
        {
            url = url + "/";
        }
        GameObject go = new GameObject();

        go.transform.parent = transform;
        go.name             = "WWW Query";
        go.AddComponent <TTFTextFontClient>();
        TTFTextFontClient tfc = go.GetComponent <TTFTextFontClient>();

        tfc.url            = url + "fontlist/list/json";
        tfc.notifiedObject = gameObject;
        tfc.signal         = "QueryServerForFontListReply";
        tfc.form           = new WWWForm();
        tfc.form.AddField("userkey", TTFTextServerUserKey);
        tfc.form.AddField("authkey", TTFTextServerAuthKey);
    }