Updating multiple Sprites - AS3 performance best practices
- by dani
Within the container "BubbleContainer" I have multiple "Bubble sprites".
Each bubble's graphics object (a circle) is updated on a timer event.
Let's say I have 50 Bubble sprites and each circle's radius should be updated with a mathematical formula. How do I organize this logic?
How do I update all Bubble sprites within the BubbleContainer? (should I call a bubble.update() function or make a temporary reference to the graphics object?)
Where do I put the Math logic? (as static functions?)