Exemple #1
0
 public ArrayLine(ArraySize size)
 {
     _lock = new object();
     lock (_lock) {
         _size = size;
         _data = new T[ToArrayCoord(_size.maxX)];
     }
 }
Exemple #2
0
 public Array(ArraySize size)
 {
     _lock = new object();
     lock (_lock) {
         _size = size;
         _data = new ArrayLine <T> [ToArrayCoord(_size.maxZ)];
         for (int z = 0; z < ToArrayCoord(_size.maxZ); z++)
         {
             _data [z] = new ArrayLine <T> (_size);
         }
     }
 }
Exemple #3
0
 public Array(int x, int z)
 {
     _lock = new object();
     lock (_lock) {
         _size = new ArraySize()
         {
             maxX = x, maxZ = z
         };
         _data = new ArrayLine <T> [ToArrayCoord(_size.maxZ)];
         for (int i = 0; i < ToArrayCoord(_size.maxZ); i++)
         {
             _data [i] = new ArrayLine <T> (_size);
         }
     }
 }