private static ulong UpdateVoxelShape(MySyncVoxel sync, PaintType type, MyShape Shape, byte Material) { var voxel = sync.Entity as MyVoxelBase; ulong changedVoxelAmount = 0; if (voxel != null) { switch (type) { case PaintType.Paint: MyVoxelGenerator.PaintInShape(voxel, Shape, Material); break; case PaintType.Fill: changedVoxelAmount = MyVoxelGenerator.FillInShape(voxel, Shape, Material); break; case PaintType.Cut: changedVoxelAmount = MyVoxelGenerator.CutOutShape(voxel, Shape); break; } } return(changedVoxelAmount); }
private ulong UpdateVoxelShape(OperationType type, MyShape shape, byte Material) { ulong changedVoxelAmount = 0; switch (type) { case OperationType.Paint: MyVoxelGenerator.PaintInShape(this, shape, Material); break; case OperationType.Fill: changedVoxelAmount = MyVoxelGenerator.FillInShape(this, shape, Material); break; case OperationType.Cut: changedVoxelAmount = MyVoxelGenerator.CutOutShape(this, shape); break; } return(changedVoxelAmount); }