Skip to content

Instantly share code, notes, and snippets.

@JonathanYin
Created October 28, 2017 22:06
Show Gist options
  • Save JonathanYin/e86bf2b5efcd46d762ee2cb8625c3446 to your computer and use it in GitHub Desktop.
Save JonathanYin/e86bf2b5efcd46d762ee2cb8625c3446 to your computer and use it in GitHub Desktop.
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class ScoreManager : MonoBehaviour
{
public static int score;
Text text;
void Awake ()
{
text = GetComponent <Text> ();
score = 0;
}
void Update ()
{
text.text = "Score: " + score;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment