Exemplo n.º 1
0
        private void SetupDatas(List <PositionsAndRotationsClass> listToFill, PositionAndRotationsObjectPool poolToUse)
        {
            ClearDatas();

            int numberOfItems = Random.Range(1, maximumRandomToGenerate);

            for (int i = 0; i < numberOfItems; i++)
            {
                listToFill.Add(new PositionsAndRotationsClass());
            }

            poolToUse.AddItems(listToFill.ToArray());
        }
Exemplo n.º 2
0
        public void Awake()
        {
            cubeObjectPool = new PositionAndRotationsObjectPool(cubePrefab, cubePoolRoot);

            sphereObjectPool = new PositionAndRotationsObjectPool(spherePrefab, spherePoolRoot);
        }