Example #1
0
    void Start()
    {
        attempts                = Instantiate(text, Vector3.zero, Quaternion.identity) as GameObject;
        attemptScript           = attempts.GetComponent <TextScript>();
        attemptScript.texture2D = attemp1;

        attemptScript.Hide();

        if (Properties.GameType == Properties.Modes.PlayforMoney)
        {
            Scoring.Get().UpdateAttemptTexture();
        }
    }
Example #2
0
 public void UpdateAttempts()
 {
     if (Properties.TotalAttempts <= 1)
     {
         Properties.Attempts = 0;
         YouLose();
     }
     else
     {
         Properties.TotalAttempts--;
         Properties.Attempts++;
         Scoring.Get().UpdateAttemptTexture();
     }
 }
Example #3
0
    public void ResetPlayForFun()
    {
        Properties.CurrentScore = Scoring.Get().totalScore.ToString();
        if (Properties.playerScores.Count > 0)
        {
            Properties.HighestScore = Properties.playerScores [0].ToString();
            if (int.Parse(Properties.CurrentScore) > int.Parse(Properties.HighestScore))
            {
                Properties.isScoreHightest = true;
            }
            else
            {
                Properties.isScoreHightest = false;
            }
        }
        else
        {
            Properties.isScoreHightest = false;
        }

        Properties.playerScores.Add(Scoring.Get().totalScore);
        Properties.playerScores.Sort();
        Properties.playerScores.Reverse();

        Properties.HighestScore = Properties.playerScores [0].ToString();

        if (Properties.playerScores.Count > Properties.LeaderBoardSize)
        {
            Properties.playerScores.RemoveRange(Properties.LeaderBoardSize, Properties.playerScores.Count - Properties.LeaderBoardSize);
        }

        for (int i = 0; i < Properties.playerScores.Count; i++)
        {
            PlayerPrefs.SetString("PlayerScore" + i, Properties.playerScores[i].ToString());
        }

        PlayerPrefs.Save();
        Scoring.Get().ResetScore();

        StartCoroutine(ShowScoreScene());
    }