Ejemplo n.º 1
0
    /* Setting & submitting score to global scoring system "Parse"
     * A dll handles the request coming to and from the global scores cloud storage
     */
    public static void ClaimScore()
    {
        string playerName  = null;
        int    playerScore = 0;

        if (!scoreSubmitted)
        {
            try{
                playerName  = PlayerPrefs.GetString("Player Name");
                playerScore = PlayerPrefs.GetInt("Player Score");

                if (playerName.Equals("") || playerName == null)
                {
                    playerName = "Anonymous";
                }

                HighScoresWindows.AddNewHighscore(playerName, playerScore);

                print("Player " + playerName + " Score Saved!");
            }
            catch (Exception error) {
                print("Error: " + error);
            }
        }
    }
Ejemplo n.º 2
0
    public void Start()
    {
        for (int i = 0; i < highscoreFields.Length; i++)
        {
            highscoreFields[i].text = i + 1 + ". Fetching...";
        }

        highscoresManager = GetComponent<HighScoresWindows>();
        StartCoroutine("RefreshHighscores");
    }
Ejemplo n.º 3
0
    void Start()
    {
        for (int i = 0; i < highscoreFields.Length; i++)
        {
            highscoreFields[i].text = i + 1 + ". Fetching...";
        }


        highscoresManager = GetComponent <HighScoresWindows>();
        StartCoroutine("RefreshHighscores");
    }
Ejemplo n.º 4
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 5
0
 void Awake()
 {
     instance = this;
 }