Пример #1
0
    public void GotName(string name)
    {
        NameEntry.SetActive(false);

        Dictionary <string, string> values = new Dictionary <string, string> ();

        values.Add("leaders", CompleteTime.ToString());

        NameText.text = NameText.text.Substring(0, NameText.text.Length - 1);

        if (NameText.text.Length < 3)
        {
            NameText.text = NameText.text + "___";
        }

        if (GlobalStats.share("", NameText.text, values))
        {
            // Success
        }
        else
        {
            // An Error occured
        }

        Invoke("GetLeaderboard", 0.5f);
        Invoke("ShowLeaderboard", 1.5f);
    }
Пример #2
0
    public void SumbmitStats()
    {
        playerStats.Add("expNorm", PlayerData.current.currentExp.ToString());

        if (gs.share("", user_name, playerStats))
        {
            // Success
            Debug.Log("success");
        }
        else
        {
            // An Error occured
            Debug.Log("fail");
        }
    }
Пример #3
0
    // see
    public void SubmitResult(string name, double distance, int graphId, int algorithmId, int score)
    {
        Dictionary <string, string> values = new Dictionary <string, string>();

        values.Add("distance", distance.ToString());
        values.Add("graph", graphId.ToString());
        values.Add("algo", algorithmId.ToString());
        values.Add("score", score.ToString());

        if (gs.share("", name, values))
        {
            // Success
        }
        else
        {
            // An Error occured
        }
    }