Пример #1
0
    void DoSelection()
    {
        grid.ClearPath();
        UpdateCurrentCell();
        if (_currentCell)
        {
            if (!_currentCell.Unit && _selectedUnit)
            {
                grid.ClearMoves(_selectedUnit);
                grid.ClearAttacks(_selectedUnit);
                ShowActions(false);
                _selectedUnit.ResetAnimation();
                _mode = Modes.Default;
            }


            _selectedUnit = _currentCell.Unit;
            grid.SelectCell(_currentCell);

            if (_selectedUnit && _selectedUnit.ActPhase == ActPhase.WaitForCommand)
            {
                ShowActions(true);
            }
        }
    }