static void DrawMap(VoxelBuilder target)
    {
        var nowHeight = target.GetNowFlowerHeight();
        var original  = target.transform.position + nowHeight;

        //畫點
        var offsetX  = 0.5f * Vector3.right * VoxelBuilder.xUnit;
        var offsetY  = 0.5f * Vector3.forward * VoxelBuilder.yUnit;
        var offsetXY = offsetX + offsetY;

        var nowFloorIndex = target.GetNowFloorIndex();

        if (!target.IsValidatedFloorIndex(nowFloorIndex))
        {
            return;
        }

        var CountY = target.CountY(); var CountX = target.CountX();

        for (var y = 0; y < CountY; ++y)
        {
            var from = original + offsetXY + offsetY * y;
            for (var x = 0; x < CountX; ++x)
            {
                ChoseColor(target, nowFloorIndex, y, x);
                Gizmos.DrawSphere(from, PointR);
                from = from + offsetX;
            }
        }
    }
Beispiel #2
0
 int GetNotFloorIndex()
 {
     return(voxelBuilder.GetNowFloorIndex());
 }