Exemplo n.º 1
0
 private void voiceEvaluateObj(bool boolean)
 {
     if (boolean)
     {
         //Debug.Log("You're correct");
         winPanel.SetActive(true);
         PlayerPrefs.SetInt("TmpScore", (PlayerPrefs.GetInt("TmpScore", 00) + 2));
         score.text = PlayerPrefs.GetInt("TmpScore", 00).ToString();
         Start();
     }
     else
     {
         //Debug.Log("Wrong Answer");
         failPanel.SetActive(true);
         HighScoreScript.insertScore(PlayerPrefs.GetInt("TmpScore"));
     }
 }
Exemplo n.º 2
0
 private void evaluateObj(Sprite sprite)
 {
     if (GetComponent <Image>().sprite == sprite)
     {
         //Debug.Log("You're correct");
         winPanel.SetActive(true);
         PlayerPrefs.SetInt("TmpScore", (PlayerPrefs.GetInt("TmpScore", 00) + 2));
         score.text = PlayerPrefs.GetInt("TmpScore", 00).ToString();
         Start();
     }
     else
     {
         //Debug.Log("Wrong Answer");
         failPanel.SetActive(true);
         HighScoreScript.insertScore(PlayerPrefs.GetInt("TmpScore"));
     }
 }