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); }
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"); } }
// 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 } }