Пример #1
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Пример #2
0
 private void Awake()
 {
     if (this.Money == null)
     {
         this.Money = GetComponentInChildren <MoneyUI>();
     }
     if (this.BuildingList == null)
     {
         this.BuildingList = GetComponentInChildren <BuildingListUI>();
     }
 }