I have a screen where you purchase power ups. What is the best attack to take about how to manage this.
I need to :
know how much gold the user has
know if the gold available is enough to buy a certain power up.
If the user has enough money and they click on the purchase button how do I relay that back to the system.
This is all easy to do if it was just one power up, but because there are six of them, it doesn’t make any sense to make six different scripts. Is there a way I can do this with just one script file?