Exemplo n.º 1
0
    //SELLING
    public void sellPlant()
    {
        if (pm.getCount() == 1)
        {
            return;
        }

        int value = price;

        if (maturity == MATURITY.SAPLING)
        {
            value = (int)(price * .75f);
        }
        else if (maturity == MATURITY.JUVENILE)
        {
            value = price * 2;
        }
        else
        {
            value = (int)(price * 3.5);
        }

        ItemManager.money += value;

        sell.gameObject.SetActive(false);
        Menu.running = true;

        pm.sellPlant(pm.getAll()[0], gameObject);
    }