public void Dispose() { _observer.Dispose(); if (_clearOnDispose) { _gridCellHighlighter.ClearHighlight(); } }
private async void HandleAddUnitsPressed() { using (_inputLock.Lock()) { Show(); ShowCancelButton(); CancellableTaskResult <IntVector2> cancelableResult; using (_gridCellHighlighter.HighlightCellOnMouseOver(stayHighlighted: true)) { cancelableResult = await _gridInputManager.LeftMouseButtonOnTile.ToButtonCancellableTask(_cancelButton); } if (!cancelableResult.isCanceled) { await _unitSpawnViewController.Show(cancelableResult.result, CancellationToken.None); } _gridCellHighlighter.ClearHighlight(); ShowToolbar(); } }