Exemple #1
0
 private void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
         instance.initItems();
     }
     else
     {
         Destroy(gameObject);
     }
 }