Пример #1
0
 public void NewOnlineScore(float _score)
 {
     nickname = PlayerPrefs.GetString("localuser");
     if (_score > PlayerPrefs.GetFloat("bestlocalscore"))                 //check if the last score is higher than the best one, if so, update it.
     {
         PlayerPrefs.SetFloat("bestlocalscore", _score);                  // set the local player pref for the score
     }
     uniqueID = SystemInfo.deviceUniqueIdentifier + "_" + nickname + "_"; // creation of the unique identifier for the player
     online.updateOnlineHighscoreData(uniqueID, nickname, _score);        //this will be the information of the player in the database
     online.startPostScores();                                            // will create a new entry in the database with the info given before.
     online.Invoke("startGetScores", 1);                                  //update what the player see in the list, invoke in 1f in case update take more time than estimated
     print("NEW ONLINE SCORE UPDATED");
 }