Skip to content
Snippets Groups Projects
Commit a13e8ed8 authored by lfn19's avatar lfn19 :speech_balloon:
Browse files

Fase Terminada

parent ca03d4ef
No related branches found
No related tags found
No related merge requests found
Showing
with 13 additions and 3 deletions
No preview for this file type
......@@ -12,12 +12,22 @@ using UnityEngine;
using UnityEngine.UI;
public class TextScoreHandler : MonoBehaviour {
private UnityEngine.UI.Text textScore;
public string scoreText = "Score: ";
private Text textScore;
private MaskHandler maskHandler; //referencia ao script MaskHandler
void Start ()
{
textScore = this.GetComponent<UnityEngine.UI.Text>();
// Pegamos das preferências (??) do usuário o score e tals
textScore.text = "PONTUAÇÃO: " + PlayerPrefs.GetInt("ScoreMasks");
textScore = this.GetComponent<UnityEngine.UI.Text>();
maskHandler = FindObjectOfType<MaskHandler>() as MaskHandler;
textScore.text = scoreText + maskHandler.score;
}
public void UpdateScore(){
textScore.text = scoreText + maskHandler.score;
}
}
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment