Esempio n. 1
0
 public ReadBuffer(ISettings settings, IBlockQueue emptyBlocks, IBlockQueue filledBlocks, int capacity)
 {
     this.settings     = settings;
     this.EmptyBlocks  = emptyBlocks;
     this.FilledBlocks = filledBlocks;
     for (int i = 0; i < capacity; i++)
     {
         EmptyBlocks.Enqueue(new DataBlock(settings.BlockSizeBytes));
     }
 }
Esempio n. 2
0
File: World.cs Progetto: Alword/Bost
        public Int3 GetGound(Double3 position)
        {
            Int3 block = position.Floor();

            while (EmptyBlocks.Contains(this[block].Id))
            {
                block += Int3.Down;
            }
            return(block);
        }