Пример #1
0
    public void Heal2(float healthAddCost)
    {
        //super weird bug cant pass multiples things through to the first number is heal added the next 3 numbers are the cost

        float cost      = healthAddCost % 1000;
        float healthAdd = (healthAddCost - cost) / 1000;

        if (cost <= money.totalmoney)
        {
            money.Buy(cost);
            print("This is the health:" + healthAdd + " and this is the cost:" + cost);
            health.Health(-healthAdd);
            Audio(purchase);
        }
        else
        {
            Audio(notenough);
        }
    }