My game has a cash value that determines what a player can buy or not. If their cash is beyond a certain point, visual upgrades are unlocked.
I have done this by changing the alpha of images from 0f to 1f when the cash of the player reaches a specific number. The problem is, once a player has bought something and the cash is subtracted, the cash is suddenly less than the threshold and the image’s alpha resets to 0.
How do I make it so that once the cash amount needed is reached, the image’s alpha can never be changed again, unless instructed so by a different if statement?
p.s: for the upgrades, no cash is subtracted.