void UpdatePolygonColorAtIndex(int indexX, int indexY, int rangeX, int rangeY, byte alpha, bool isBorder = false) { for (int x = -rangeX; x <= rangeX; x++) { for (int y = -rangeY; y <= rangeY; y++) { if (isBorder) { if (x != -rangeX && x != rangeX && y != -rangeY && y != rangeY) { continue; } } if ( _plane.isWithinRange((indexX + x), (indexY + y)) && _plane[indexX + x, indexY + y].getAlpha() > alpha) { _plane.UpdatePolygonColorAtIndex(indexX + x, indexY + y, new Color32(0, 0, 0, alpha)); } } } }