Advertisement
Guest User

Untitled

a guest
Jun 10th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System.Collections;
  4.  
  5. public class ScoreManager : MonoBehaviour
  6. {
  7. public static int score;
  8.  
  9.  
  10. Text text;
  11.  
  12. void Awake()
  13. {
  14.  
  15. text = GetComponent<Text>();
  16.  
  17. score = 0;
  18. }
  19.  
  20.  
  21. void Update()
  22. {
  23.  
  24. text.text = "Score: " + score;
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement