public Designator_StripMine() { UseDesignatorDef(AllowToolDefOf.StripMineDesignator); highlighter = new MapCellHighlighter(EnumerateHighlightCells); Dragger.SelectionStart += DraggerOnSelectionStart; Dragger.SelectionChanged += DraggerOnSelectionChanged; Dragger.SelectionComplete += DraggerOnSelectionComplete; updateCallback = OnUpdate; }
protected Designator_SelectableThings() { var highlighter = new MapCellHighlighter(SelectHighlightedCells); Action <CellRect> clearHighlightedCells = r => highlighter.ClearCachedCells(); Dragger.SelectionStart += clearHighlightedCells; Dragger.SelectionChanged += clearHighlightedCells; Dragger.SelectionComplete += clearHighlightedCells; Dragger.SelectionUpdate += r => highlighter.DrawCellHighlights(); }