I have a system where you can collect powerups, upon collecting these they will be displayed on the top right corner of the screen.
As shown here:
However, when I enter the next layout, all of these powerups are gone.. I gave them a persist behavior.
Here is a piece of the code:
As you can see, the position of the powerups is based on how many there are. So basically How do I make the game remember how many powerups there are, which animation frame each one has and the position there have.