Game Development Reference
In-Depth Information
What just happened?
We now have a vector of invisible meteor sprites and a vector of invisible health sprites.
We'll use their respective pool indices to retrieve these from the vector as needed as you'll
see in a moment. But first we need to take care of actions and animations.
Note
With object pools, we reduce the number of instantiations during the main loop, and it al-
lows us to never destroy anything that can be reused. But if you need to remove a child
from a node, use ->removeChild or ->removeChildByTag if a tag is present.
Search WWH ::




Custom Search