Cocos2d has a easy to use CCMenu object to which you add CCMenuItems. In SpriteKit however, you are back to UIKit objects. This doesn’t not mean its more complicated, its just different :-). You will need to create a UIControl such as a button or you can use SpriteKit’s SKNode to create the visual object onscreen: SKLabelNode* someNode = [SKLabelNode labelNodeWithFontNamed:@”Chalkduster”]; [someNode setText:@”Play Game”]; [someNode setPosition:CGPointMake(CGRectGetMidX(self.frame)+5,CGRectGetMidY(self.frame)-40)]; [self addChild: someNode]; Now you simply connect the object action to some event like so: for (UITouch *touch in touches) { CGPoint location = [touch locationInNode:self]; if ([someNode containsPoint:location]) { SKTransition* present = [SKTransition revealWithDirection:SKTransitionDirectionDown duration:1]; GameScene* gameScene = [[GameScene alloc] initWithSize:CGSizeMake(1024, 768)]; [self.scene.view… Read More
Continue ReadingiOS7 Sprite Kit for Game Design for iPhone & iPad
iOS 7 Series – Sprite Kit Welcome to iOS7 and to start off, I want to kick things off with SpriteKit. Although it deals with video games, many companies are using iOS apps as a marketing tactic to engage their users in an effort to promote their products. SpriteKit is the most prominent feature in iOS7 so we’re going to take a quick tour. Go ahead and create a New Project in XCode5 and select the SpriteKit template (the bottom right icon): Click next and fill in your project data. Once you are in the main XCode window notice we have the following files in the Project Navigator: 1) AppDelegate… Read More
Continue Reading