void DrawCursor(GridDungeonConfig config, bool mode2D, int size) { size = Mathf.Max(1, size); var cursorSize = config.GridCellSize * size; DrawRect(cursorPosition, cursorSize, Color.red, 0.25f, 0.8f, mode2D); }
void DrawOverlayData(GridDungeonConfig config, GridDungeonModel model, bool mode2D) { var mode = target as DungeonPaintModeGrid; var opacity = mode.overlayOpacity; var gridSize = config.GridCellSize; var cellColorProcedural = Color.blue; var cellColorUserDefined = Color.cyan; // Visualize the user defined cells defined by the paint tool foreach (var cell in model.Cells) { var size = Vector3.Scale(DMathUtils.ToVector3(cell.Bounds.Size), gridSize); var location = Vector3.Scale(DMathUtils.ToVector3(cell.Bounds.Location), gridSize); var color = cell.UserDefined ? cellColorUserDefined : cellColorProcedural; DrawRect(location, size, color, opacity, 0.3f, mode2D); } }