Пример #1
0
    private void SetDisplayButtons()
    {
        _displayButtons.Clear();

        switch (CurrentBuildState)
        {
        case BuildState.None:
            _displayButtons.Add(BuildButton.gameObject);
            _bc.ClearPreview();
            break;

        case BuildState.Build:
            GetBuildableTowerButtons();
            _displayButtons.Add(CancelButton.gameObject);
            break;

        case BuildState.Selected:
            GetUpgradeButtons();
            _displayButtons.Add(SellButton.gameObject);
            _displayButtons.Add(CancelButton.gameObject);
            break;

        default:
            break;
        }
    }