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.
![](https://uploads.gamedev.net/forums/monthly_2021_11/6cf49b1d4fa64c4e8af0a0c9e9d1e93d.photo2.jpg)
![](https://uploads.gamedev.net/forums/monthly_2021_11/74091fc4d2ec4956aa36b1c7c94d7a4a.photo3.jpg)
![](https://uploads.gamedev.net/forums/monthly_2021_11/491c2d5eae6b4c80974a4eecf18df740.Photo1.jpg)