Exemple #1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     ui_d1 = GameObject.Find("ui_d1").GetComponent <ScoreNumber>();
     ui_d2 = GameObject.Find("ui_d2").GetComponent <ScoreNumber>();
     ui_d3 = GameObject.Find("ui_d3").GetComponent <ScoreNumber>();
 }