コード例 #1
0
 public ushort Add(VoxelProperties props)
 {
     if (voxels.Count > ushort.MaxValue)
     {
         throw new OutOfMemoryException("No more room for voxel types!");
     }
     voxels.Add(props);
     return((ushort)(voxels.Count - 1));
 }
コード例 #2
0
 public ushort Add(VoxelProperties props)
 {
     if (voxels.Count > ushort.MaxValue) throw new OutOfMemoryException("No more room for voxel types!");
     voxels.Add(props);
     return (ushort)(voxels.Count - 1);
 }