Abstract
The solution to enemy spawning thus far has been to use the update method in the SKBGameScene class to create new sprites in a repeating loop until hitting a statically defined maximum. While this works fine for viewing immediate results when adding new enemy classes, it’s not an elegant or efficient solution in the long term. You need a way of introducing characters into play in such a way that you can easily change your mind without having to change the code, thereby forcing you to rebuild the project every time you add, remove, or modify your spawning ideas. In other words, you need a dynamic “cast of characters.”
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Leland Long
About this chapter
Cite this chapter
Long, L. (2014). Creating a Cast of Characters. In: Learn Sprite Kit for iOS Game Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6440-8_6
Download citation
DOI: https://doi.org/10.1007/978-1-4302-6440-8_6
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-6439-2
Online ISBN: 978-1-4302-6440-8
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)