﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;

namespace WhoaAlgebraic
{
    public class ScoreManager : MonoBehaviour
    {
        public static int score;        // The player's score.


        Text text;                      // Reference to the Text component.


        void Awake()
        {
            // Set up the reference.
            text = GetComponent<Text>();

            // Reset the score.
            score = 0;
        }


        void Update()
        {
            // Set the displayed text to be the word "Score" followed by the score value.
            text.text = "Score: " + score;
        }
    }
}
﻿using UnityEngine;
using UnityEngine.UI;

namespace WhoaAlgebraic
{
    public class ScoreManager : MonoBehaviour
    {
        public static int score;        // The player's score.


        public Text text;                      // Reference to the Text component.


        void Awake()
        {
            // Reset the score.
            score = 0;
        }


        void Update()
        {
            // Set the displayed text to be the word "Score" followed by the score value.
            text.text = "Score: " + score;
        }
    }
}
Update score manager to use UI's text
Update score manager to use UI's text
