示例#1
0
        public static ChunkThread StartNew(Vector2Int chunkLocation, VOX.Map map, Vector3Int chunkSize)
        {
            var thread = new ChunkThread();

            thread.Start(chunkLocation, map, chunkSize);
            return(thread);
        }
示例#2
0
 public void Start(Vector2Int chunkLocation, VOX.Map map, Vector3Int chunkSize)
 {
     if (IsRunning)
     {
         return;
     }
     lock (locker)
     {
         if (IsRunning)
         {
             return;
         }
         _th       = new Thread(Main);
         IsRunning = true;
         _th.Start(new ThreadStartArgs()
         {
             location  = chunkLocation,
             map       = map,
             chunkSize = chunkSize
         });
     }
 }
示例#3
0
 public Chunk(VOX.Map parent, Vector2Int location)
 {
     Location = location;
     Parent   = parent;
 }