예제 #1
0
        public static int[] FakeHeights(IntVector3 size, int startY)
        {
            var stairs = Stairs(size);
            var result = new FlatArray2D <int>(size.xz);

            foreach (var vox in stairs)
            {
                var pos = IntVector3.FromUint256(vox);
                result[pos.xz] = result[pos.xz] < pos.y + startY ? pos.y + startY : result[pos.xz];
            }
            return(result.storage);
        }
예제 #2
0
 public HeightMap(IntVector2 size)
 {
     storage = new FlatArray2D <int>(size);
 }