i am making a sprite-kit game for IOS, and i want to add a something similar to a character select menu, how would i do that ?
searched around on the web and didn't find any pages that could solve my problem
i am making a sprite-kit game for IOS, and i want to add a something similar to a character select menu, how would i do that ?
searched around on the web and didn't find any pages that could solve my problem
What I would do is to create another view controller or SKScene.
If you are going to use an SKScene do:
override func touchesBegan(touches: Set<NSObject>, withEvent event:
UIEvent) {
for touch in (touches as! Set<UITouch>) {
let touchLocation = touch.locationInNode(self)
let touchedNode = nodeAtPoint(touchLocation)
if touchedNode.name == ... {
chosen character = touchednode
} else if touchedNode.name == "Blah blah" { ... etc
You can add a table-view controller and embed it in a navigation controller. The cells will have all the characters. When the user clicks a certain cell in the navigation controller, the clicked cell will be the chosen character. For more info you can go to apple's website: https://developer.apple.com/library/prerelease/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson7.html
Hope this helped.