Esempio n. 1
0
    public void SaveHighScore()
    {
        if (playerPosition == 1)
        {
            playerData.thirdPlaceInitials  = playerData.secondPlaceInitials;
            playerData.secondPlaceInitials = playerData.firstPlaceInitials;
            playerData.firstPlaceInitials  = initialsInputField.GetComponent <InputField>().text;
        }
        else if (playerPosition == 2)
        {
            playerData.thirdPlaceInitials  = playerData.secondPlaceInitials;
            playerData.secondPlaceInitials = initialsInputField.GetComponent <InputField>().text;
        }
        else if (playerPosition == 3)
        {
            playerData.thirdPlaceInitials = initialsInputField.GetComponent <InputField>().text;
        }

        // Now save all the data
        PlayerDataSaver.SavePlayerData(playerData);
    }