Exemple #1
0
 protected void OnDestroy()
 {
     if (GetComponent<Text>() == instance)
     {
         instance = null;
     }
 }
Exemple #2
0
 protected void Start()
 {
     if (instance != null)
     {
         Debug.LogError("ScoreViewer instance != null");
     }
     else
     {
         instance = this;
         label = GetComponent<Text>();
         ResetScoreLocal();
     }
 }