示例#1
0
    public IEnumerator GetSprites()
    {
        string hash = Md5Ultility.Md5Sum(id + secretKey);
        string url  = getSpriteURL + "id=" + id + "&hash=" + hash;

        WWW www = new WWW(url);

        yield return(www);

        if (www.error != null)
        {
            Debug.Log("There was an error posting the high score: " + www.error);
        }
        else
        {
            //Debug.Log(www.text);
            spriteBundle = www.text.Split('/');
            for (int i = 0; i < spriteBundle.Length; i++)
            {
                spriteBundle[i] = spriteBundle[i].TrimStart().TrimEnd();
            }
        }
    }
示例#2
0
    public IEnumerator GetText(int lang)
    {
        string hash = Md5Ultility.Md5Sum(id + secretKey);
        string url  = getTextURL + "id=" + id + "&hash=" + hash + "&lang=" + lang;

        WWW www = new WWW(url);

        yield return(www);

        if (www.error != null)
        {
            Debug.Log("There was an error posting the high score: " + www.error);
        }
        else
        {
            //Debug.Log(www.text);
            textBundle = www.text.Split('/');
            //Debug.Log(textBundle[0] + " - " + textBundle[1]);
            for (int i = 0; i < textBundle.Length; i++)
            {
                textBundle[i] = textBundle[i].TrimStart().TrimEnd();
            }
        }
    }