I have a coin sprite which has multiple frames. Each frame is a different looking coin. The coin also has a instance variable to track value. Every 2 seconds I call the function itemspawn listed below.
(Coppercoin=1, silvercoin=2, goldcoin=3 etc..)
At the moment I have the coin spawning, and it changes to a random frame. When I collect the coin I get the correct value. The problem is ALL COINS update frame when a new coin is generated.
So if a gold coin spawns it will start to fall from the top of the screen, if a new coin spawns before I can get to it, the gold coin may change into a copper coin. this repeats every time a new coin sprite spawns for all coin sprite objects on screen. Any ideas on how to fix this?