GameObject GenerateCave(CaveGenerator generator) { GameObject cave = generator.Generate(); cave.transform.parent = transform; return(cave); }
/// <summary> /// Generate a cave whose outline consists of distinct rocks. /// </summary> public GameObject GenerateRockCave() { GameObject cave = CaveGenerator.GenerateRockCave(rockCaveConfig, randomize); cave.transform.parent = transform; return(cave); }
/// <summary> /// Generate a three tier cave: a distinct mesh will be produced for the floor, walls and ceiling. /// Furthermore, large caves will be broken up into sectors which each have their own floor/wall/ceiling. /// </summary> public GameObject GenerateThreeTier() { GameObject cave = CaveGenerator.GenerateThreeTierCave(threeTierCaveConfig, randomize); cave.transform.parent = transform; return(cave); }
GameObject GenerateThreeTier() { if (randomize) { threeTierCaveConfig.SetSeed(GetRandomSeed()); } CaveGenerator caveGenerator = caveGeneratorFactory.BuildThreeTierCaveGen(threeTierCaveConfig); return(GenerateCave(caveGenerator)); }
GameObject GenerateRockCave() { if (randomize) { rockCaveConfig.SetSeed(GetRandomSeed()); } CaveGenerator caveGenerator = caveGeneratorFactory.BuildOutlineCaveGen(rockCaveConfig); return(GenerateCave(caveGenerator)); }