Exemplo n.º 1
0
        public RenderWorker(DataProcessorManager manager)
            : base(manager)
        {
            _meshCalculator    = new MeshCalculator();
            _prevRenderHandler = new PrevRenderHandler(manager);

            _renderQueue     = new Queue <Chunk>();
            _highRenderQueue = new Queue <Chunk>();
            _prevRenderQueue = new Queue <PrevRenderChunk>();
        }
        public PersistanceWorker(DataProcessorManager manager)
            : base(manager)
        {
            _selfLoadQueue = new HeapPriorityQueue <PriorityChunk>(1000);
            _selfSaveQueue = new Queue <Chunk>();
            _refreshQueue  = new Queue <RefreshChunkArea>();
            _netLoadQueue  = new Queue <NetChunkData>();
            _netSaveQueue  = new Queue <NetChunkData>();

            _netChunkLoadQueue = new HeapPriorityQueue <NetPriorityChunk>(1000);
            _netChunkSaveQueue = new Queue <NetRemovedChunk>();
        }
Exemplo n.º 3
0
        //		private int netGenerateNum;

        public GeneratorWorker(DataProcessorManager manager)
            : base(manager)
        {
            _selfGeneratorQueue         = new HeapPriorityQueue <PriorityChunk>(1000);
            _netGeneratorQueue          = new HeapPriorityQueue <NetPriorityChunk>(1000);
            _refreshQueue               = new Queue <RefreshChunkArea>(1000);
            _netRefreshQueue            = new Queue <RefreshChunkArea>(1000);
            _terrainControlGenerator    = new TerrainControlGenerator();
            _cavesGenerator             = new CaveGenerator(WorldConfig.Instance.seed);
            _populationControlGenerator = new PopulationControlGenerator();
            _lightControlGenerator      = new LightControlGenerator(_manager.World);
            singleGenerateNum           = 0;
            //			netGenerateNum = 0;
        }
Exemplo n.º 4
0
        public PrevRenderHandler(DataProcessorManager manager)
        {
            _manager = manager;
//			_sunLightSpread = new LightSpread(_manager.World);
//			_sunLightShrink = new LightShrink(_manager.World);

            _sunLightSpread = new SunLightSpread(_manager.World);
            _sunLightShrink = new SunLightShrink(_manager.World);

//			_blockLightSpread = new LightSpread(_manager.World,false);
//			_blockLightShrink = new LightShrink(_manager.World,false);
            _blockLightSpread = new BlockLightSpread(_manager.World);
            _blockLightShrink = new BlockLightShrink(_manager.World);
            _chunkChangedList = new List <Chunk>();
        }
Exemplo n.º 5
0
 public ProcessWorker(DataProcessorManager manager)
 {
     _manager = manager;
 }
 public WorldGenerator(World world)
 {
     _world   = world;
     _manager = new DataProcessorManager(_world);
 }