private void ToggleHighlight(bool on, HighlightSelection sel) { Color color = neutralColor; List <Tile> tiles = new List <Tile>(); switch (sel) { case HighlightSelection.Main: color = on ? mainColor : neutralColor; tiles = mainSelection; ToggleHighlight(false, HighlightSelection.Sub); break; case HighlightSelection.Sub: color = on ? subColor : neutralColor; tiles = subSelection; break; default: break; } HighlightTiles(tiles, color); }
/// <summary> /// Sets tiles to highlight. If no tiles, will clear highlight. </summary> /// <param name="selection"> Sub or Main, the type of selection</param> /// <param name="tiles"> The tiles you want to highlight. Null by default</param> public HighlightEvent(HighlightSelection selection, List <Tile> tiles = null) { Selection = selection; Tiles = tiles; }