Advertisement
8ydilnik

score

Sep 18th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class sccorre : MonoBehaviour
  7. {
  8.     public int score = 0;
  9.         public Text scoretext;
  10.  
  11.     public static sccorre instacne;
  12.     // Start is called before the first frame update
  13.     void Start()
  14.     {
  15.         if(instacne == null)
  16.         {
  17.             instacne = this;
  18.         }
  19.         scoretext.text = "Score: " + score;
  20.  
  21.     }
  22.  
  23.     // Update is called once per frame
  24.     void Update()
  25.     {
  26.         scoretext.text = "Score: " + score;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement