void Start() { //instance = this; if (randomizeSeedOnStart) { seed = Random.Range(0, int.MaxValue); } random = new DRandom(); random.Init(seed); if (randomizeRoomSize) { targetRooms = 30 + (int)(random.value() * 50f); } Debug.Log(targetRooms); roomsCount = 0; globalVoxels = new Dictionary <Vector3, GameObject>(); dungeonSet = random.range(0, data.sets.Count - 1); //Debug.Log("Generating dungeon with data:"); //Debug.Log("Rooms count: " + targetRooms); //Debug.Log("Using set: " + data.sets[dungeonSet].name); StartGeneration(); }
void Start() { //instance = this; if (randomizeSeedOnStart) { seed = Random.Range(0, int.MaxValue); } random = new DRandom(); random.Init(seed); if (randomizeRoomSize) { targetRooms = 15 + (int)(random.value() * 50f); } roomsCount = 0; globalVoxels = new Dictionary <Vector3, GameObject>(); dungeonSet = random.range(0, data.sets.Count - 1); //Debug.Log("Generating dungeon with data:"); //Debug.Log("Rooms count: " + targetRooms); //Debug.Log("Using set: " + data.sets[dungeonSet].name); try { StartCoroutine(StartGeneration()); } catch (Exception e) { Console.WriteLine(e); throw; } Debug.Log("Generated in: " + stopwatch.ElapsedMilliseconds + "ms"); }
private void Start() { random = new DRandom(); random.Init(Random.Range(0, int.MaxValue)); PositionOnFloor(); }
public CandidatesManager(ElementsFactory factoryOwner, ZonesGenerator zonesGenerator) { this.factoryOwner = factoryOwner; this.zonesGenerator = zonesGenerator; random = new DRandom(); random.Init(factoryOwner.Seed); }