Пример #1
0
 private void Awake()
 {
     _bigAsteroidsPool   = ObjectPool.Build(AsteroidBig_Prefab, 25, 25);
     _smallAsteroidsPool = ObjectPool.Build(AsteroidSmall_Prefab, 25, 25);
     gameScreenLogger    = GameScreenLogger.New(UIStorage.Instance.mainscreen_Text);
     AsteroidsManager.New(_bigAsteroidsPool, _smallAsteroidsPool);
 }
Пример #2
0
        public void GenerateExplosionPools()
        {
            m_BigExplosionPool   = ObjectPool.Build(explosion_Big_Prefab, 5, 5);
            m_SmallExplosionPool = ObjectPool.Build(explosion_Small_Prefab, 5, 5);

            m_BigExplosionPool.hideFlags   = HideFlags.DontSave;
            m_SmallExplosionPool.hideFlags = HideFlags.DontSave;

            shipExplosion = Instantiate(explosion_Ship_Prefab);
            ufoExplosion  = Instantiate(explosion_UFO_Prefab);

            shipExplosion.SetActive(false);
            ufoExplosion.SetActive(false);
        }
Пример #3
0
        private void Awake()
        {
            _r2d2_Pool         = ObjectPool.Build(Enemy_Rd2d, 25, 25);
            _chicken_Pool      = ObjectPool.Build(Enemy_Chicken, 25, 25);
            _robox25_Pool      = ObjectPool.Build(Enemy_Robox25, 25, 25);
            _followingCamera2D = FindObjectOfType <CinemachineVirtualCamera>();

            EnemyPools.Add(_r2d2_Pool);
            EnemyPools.Add(_chicken_Pool);
            EnemyPools.Add(_robox25_Pool);

            gameScreenLogger = GameScreenLogger.New(UIStorage.Instance.mainscreen_Text);
            //AsteroidsManager.New(_bigAsteroidsPool, _smallAsteroidsPool);
        }