Ejemplo n.º 1
0
    public void BuyShip()
    {
        int coins = StatusOfGame.GetCoins();

        Debug.Log(selectedItem);

        if (coins >= Price[selectedItem] & Items[selectedItem] == false)
        {
            StatusOfGame.MinusCoins(Price[selectedItem]);
            Items[selectedItem] = true;
            InventoryScript.BoughtItem(selectedItem);
            Price[selectedItem] = -1;
            PriceUpdater.ChangeItemSelected(Price[selectedItem]);
            Debug.Log("Bought Item: " + selectedItem);
        }
    }