コード例 #1
0
    public void SelectedSell()
    {
        if (!selectedGO)
        {
            return;
        }
        PlaceableObject bld = selectedGO.GetComponent <PlaceableObject>();

        if (bld.canSell)
        {
            bld.Sell();
            ClearSelection();
            GetComponent <Notification>().text.text = "Sold " + bld.buildingName;
        }
        else
        {
            GetComponent <Notification>().text.text = bld.buildingName + " is not sellable";
        }
    }