Exemplo n.º 1
0
        public static void DrawAllChunksWithinViewDistance()
        {
            ThreadedChunkWork tcw;

            if (!NonChunkSpecificWork.TryGetValue(JobType.LoadViewDistance, out tcw))
            {
                ThreadedViewDistanceLoaderWork tvdlw = new ThreadedViewDistanceLoaderWork(ViewDistance, PlayerChunkPos, PlayerPositionHasChanged);
                NonChunkSpecificWork.Add(JobType.LoadViewDistance, tvdlw);
                ThreadHandler.EnqueuWork(tvdlw);
            }

            UnloadChunksOutsideViewDistance();
        }
Exemplo n.º 2
0
    void TestViewDistanceLoader()
    {
        CompletedViewDistanceLoaderWork cvdlw = new ThreadedViewDistanceLoaderWork(15, new Vector3(0, 0, 0), ChunkHandler.PlayerHasMoved).Work() as CompletedViewDistanceLoaderWork;

        cvdlw = new ThreadedViewDistanceLoaderWork(15, new Vector3(0, 0, 0), ChunkHandler.PlayerHasMoved).Work() as CompletedViewDistanceLoaderWork;
    }