I know how to add Button in SpriteKit
.
I have done with SKSpriteNode
.
However i don't know how to add highlight button like UIButton
.
I mean when i pressing SKSpriteNode(Button)
, i want to show highlighted image like UIButton
from UIKit.
How can i do that?
Here is my codes that for Button
with SKSpriteNode
.
self.playButton = [SKSpriteNode spriteNodeWithImageNamed:@"playButton.png"];
self.playButton.position = CGPointMake(self.frame.origin.x + 400, 100);
self.playButton.name = @"playButton";
self.playButton.zPosition = 2;
[self addChild:self.playButton];