private IEnumerator GeneticProcess() { CalcBounds(); var userNodes = Zone.GetUserNodes(); while (true) { Essences.Clear(); const int StartSetCount = 1; for (int i = 0; i < StartSetCount; i++) { Essences.Add(new GeneticEssence(userNodes)); } foreach (var i in Essences) { Clear(); SpawnFunction(i); Zone.MakePlaces(); int places = Zone.GetPlacesCount(); if (places > BestCount) { BestCount = places; BestEssence = i; Debug.Log("Best: " + BestCount); } yield return(null); yield return(new WaitForSeconds(0.07f)); } } }
public MonolithCache(Monolith monolith) { Id = monolith.Id; Position = monolith.Position; WalkablePosition = ExilePather.FastWalkablePositionFor(monolith); MonsterName = monolith.Name; MonsterMetadata = monolith.MonsterTypeMetadata; Essences = monolith.EssenceBaseItemTypes; IsValid = true; Log.InfoFormat("[MonolithCache] {0} {1} {2} {3} {4}", Id, WalkablePosition, MonsterName, MonsterMetadata, string.Join(", ", Essences.Select(e => e.Metadata))); }