Animated sprites – asteroids
The asteroids we create for Asteroid Belt Assault are included on the SpriteSheet.png
texture as the top row of 50 by 50 pixel images. There are 20 individual animation frames of the asteroid spinning through space:
Much like we did with the StarField class, we will create a class that will automatically manage the game's asteroids for us, including their initial positioning, handling what happens when they collide with each other, and repositioning them when they have moved off the screen.