예제 #1
0
    private void TowerSellConfirm()
    {
        AudioHandler.ClickSound();

        // Sell the selected tower.
        Player.health += selectedTowerForSell.SellPrice();
        GameObject.Destroy(selectedTowerForSell.GetGameobject());

        HideSellOptions();
    }
예제 #2
0
    /// <summary>Shows the sell options for the selected tower.</summary>
    public void OwnedTowerClick(ITower click)
    {
        if (bBuying)
        {
            return;
        }

        selectedTowerForSell = click;
        selectedTowerForSell.ShowRangeCircle(true);
        label_sellBtn.text = string.Format("{0}{1:n0}", TEXT_SELLBTN, selectedTowerForSell.SellPrice());

        sellOptions.alpha = 1.0f;
        sellOptions.gameObject.SetActive(true);

        bSelling = true;
    }