how to upgrade once at a time

I've got a table full of upgrades in a game with 4 columns:

Price Gold (integer) , Price Food (integer) , Price Wood (integer) and Unlocked (boolean).

In the actor controlling the upgrades I have a self attribute of 'current level' which goes up by one each time the next tier is unlocked. I'm pulling all the info from the tables and then changing it when the player has greater than or equal to the price in each currency, taking away the cost from the amount the player has.

The problem I'm having is that when the player has more than enough in each currency to buy, say 3 consecutive upgrades, with one press it will upgrade it to the highest level affordable, which is annoying because it completely drains the currencies and doesn't allow the player to spread the upgrades between different things.

Any ideas of how to limit it to one tier upgrade per tap?

Thanks in advance

Comments

Sign In or Register to comment.