Where To Go From Here?
You can download the completed version of the project using the Download Materials button at the top or bottom of this tutorial.
For more animation fun, here are a few ideas to try out:
- What if you wanted the bear to moonwalk? Hint: Try building the array of images backwards!
- Try accelerating or slowing down the frame times in
animateBear()
.
- Try animating multiple bears on the screen at the same time. Hint: Create multiple sprite nodes with actions.
At this point, you should know all you need to start adding animations to your projects using texture atlases. Have some fun and experiment by creating your own animations and seeing what you can do!
If you want to learn more about SpriteKit and Swift, you should check out our book 2D Apple Games by Tutorials. We'll teach you everything you need to know — physics, tile maps, particle systems and even making your own 2D game art.
In the meantime, if you have any questions or comments, please join the forum discussion below!