Exemple #1
0
 private void Awake()
 {
     if (instance && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
 }
Exemple #2
0
 private void LoadHealthbar()
 {
     _healtbar = gameObject.GetComponentInChildren <Healtbar>();
 }