void IniSingleton() { if (_instance != null) { return; } _instance = this; if (Prefab_Laser != null) { LasersParent = new GameObject("Laser Pool"); LasersParent.transform.parent = this.transform; _laserPool.Initialize(LasersParent.transform, Prefab_Laser, 10); _explosionPool.Initialize(this.transform, Prefab_Explosion, 10); CurrentLevel = 1; } }
void OnDestroy() { _instance = null; }