Esempio n. 1
0
 public VisibilityQueueJob(AreaRange range)
 {
     Range = range;
     AreasToGenerate = new List<Vector3i>();
     AreasToRender = new List<Area>();
     AreasToRenderNeighbors = new List<Area>();
 }
Esempio n. 2
0
        public void Initialize(Vector2i viewDistance, TerrainContext terrainContext)
        {
            this.terrainContext = terrainContext;

            areasAlwaysVisibleWithinDistance = Area.Size.X * 2;

            view = new ViewSettings(viewDistance);

            AreaCollection = new AreaCollection();
            AreaCache = new AreaCacheCollection();
            areaRange = new AreaRange();
            viewDistanceAreaRange = new AreaRange();

            visibilityQueue = new VisibilityQueue(terrainContext);
            Statistics = new TerrainVisibilityStatistics(this, AreaCache);
            SpawnPointHelper = new AreaSpawnPointHelper(terrainContext);

            Logger.RegisterLogLevelsFor<TerrainVisibility>(Logger.LogLevels.Adaptive);
        }