- Home /
Question by
Abhi94 · Jul 07, 2015 at 04:01 PM ·
script.scorehighscores
how can i show my high score scored in game?
i have seen previous questions related to this topic , but seems to help . So please kindly help me as this is the last phase of my game. This is my score Script
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ScoreController : MonoBehaviour {
public Text ScoreText;
public int score;
private int Count = 2;
public Text TotalScoreText;
void Start () {
score = 0;
UpdateScore ();
}
public void UpdateScore() {
ScoreText.text = "Score: " + score;
TotalScoreText.text = "TOTAL SCORE -: " + score;
}
public void AddScore( )
{
score += Count;
UpdateScore ();
}
}
Comment
Answer by Graham-Dunnett · Jul 07, 2015 at 04:01 PM
I guess your Unity documentation doesn't work. Try: