Please help to implement the function of buying multiple levels as in the screenshots.
To calculate the new price use the formula:
newCost = baseCost * Mathf.Pow(multi,lvl);
float baseCost - fixed base price of buying a levelnew
float newCost - constantly changing new price
float multi - multiplier, which is equal to 1.09
int lvl - the degree which is increased by the value of the level
Because of this formula, the price increases with each level, and I can't buy multiple levels at once.
I am new to C#, if you can explain in more detail, I would appreciate it.