Пример #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
     impactText.enabled = false;
     textRect           = impactText.GetComponent <RectTransform>();
 }
Пример #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
     impactText.gameObject.SetActive(false);
     textRect = impactText.GetComponent <RectTransform>();
 }