public void BuildTower() { var blocks = _generator.GenerateTower(Position, Height, CubePrefab); foreach (var block in blocks) { Instantiate(block.Prefab, block.Position, block.Rotation); ObjectCount++; } }
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); } }