Exemplo n.º 1
0
        public void BuildTower()
        {
            var blocks = _generator.GenerateTower(Position, Height, CubePrefab);

            foreach (var block in blocks)
            {
                Instantiate(block.Prefab, block.Position, block.Rotation);
                ObjectCount++;
            }
        }
Exemplo n.º 2
0
        private void CreateNewTower()
        {
            var newObjects = _generator.GenerateTower(SpawnPoint, TowerHeight, Prefab);

            foreach (var jengaBlock in newObjects)
            {
                var newGameObject = (GameObject)Instantiate(jengaBlock.Prefab, jengaBlock.Position, jengaBlock.Rotation);
                NebulaServer.AddNewGameObject(newGameObject);
            }
        }