public GamePool() { Bullet = PoolContainer.CreatePool <PoolObject>(StaticPrm.PoolPath.PATH_BULLET); TankGreen = PoolContainer.CreatePool <PoolObject>(StaticPrm.PoolPath.PATH_TANK_GREEN); TankRed = PoolContainer.CreatePool <PoolObject>(StaticPrm.PoolPath.PATH_TANK_RED); TankPurple = PoolContainer.CreatePool <PoolObject>(StaticPrm.PoolPath.PATH_TANK_PURPLE); }
public void Initialize() { _player = _playerFilter.Components1[0]; _map = _world.CreateEntityWith <MapComponent>(); _map.LastCoords = new CubeCoords(0, 0); _map.PoolB = PoolContainer.CreatePool(Utils.BackPrefabPath); _map.PoolF = PoolContainer.CreatePool(Utils.ForePrefabPath); MapGenRandomNeighbours.GenerateMap(out _map.MapB, out _map.MapF, MapSize, MapSeed); RenderFull(new CubeCoords(0, 0), Fow); }
private void InitPoolAndSpawnFirst() { var parent = GameObject.FindGameObjectWithTag(Tag.FieldPool).transform; //create zombie pool _zombiePool = PoolContainer.CreatePool(ZombiePrefabs[0], parent); //create coin pool _coinsPool = PoolContainer.CreatePool(CoinPrefab, parent); //create fields pool _poolContainers = new PoolContainer[m_EasyLevelsPrefabs.Count + m_NormalLevelsPrefabs.Count + m_HardLevelsPrefabs.Count]; m_AllLevels = new List <GameObject>(); m_AllLevels.AddRange(m_EasyLevelsPrefabs); m_AllLevels.AddRange(m_NormalLevelsPrefabs); m_AllLevels.AddRange(m_HardLevelsPrefabs); for (int i = 0; i < _poolContainers.Length; i++) { _poolContainers[i] = PoolContainer.CreatePool(new List <GameObject>(m_AllLevels)[i], parent); } // spawn zombies for default level SpawnZombie(0, m_DefaultLevelTransform); //init ground size // _groundSize = firstObject.PoolTransform.FindRecursiveByTag(Tag.Ground).localScale.y; _groundSize = 30f; // add any level, it won't be generated, because level0 is already presented _path.Add(new Field(0)); // -1 and 0 fields are already on scene so spawn some more fields forward for (int i = 0; i < ForwardSpawnCount; i++) { PopOrSpawnById(i + 1); } }
public PoolsObject() { Blocks = PoolContainer.CreatePool <PoolObject>(pathBlock); Booms = PoolContainer.CreatePool <PoolObjectBoom>(pathBoom); }
public PoolsObject() { Bullets = PoolContainer.CreatePool <PoolObjectExt>(pathBullet); Mobs = PoolContainer.CreatePool <PoolObjectExt>(pathMob); }
public PoolsObject() { Enemies = PoolContainer.CreatePool <PoolObjectExt>(pathEnemy); }