コード例 #1
0
        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;
            }
        }
コード例 #2
0
 void OnDestroy()
 {
     _instance = null;
 }