Created
April 7, 2014 12:18
-
-
Save veeneck/10019224 to your computer and use it in GitHub Desktop.
Adding text with font in Sprite Kit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SKLabelNode *myLabel = [SKLabelNode labelNodeWithFontNamed:@"DINCond-RegularAlternate"]; | |
myLabel.text = @"it's happening"; | |
myLabel.fontColor = [SKColor colorWithRed:0.271 green:0.271 blue:0.271 alpha:1]; /*#454545*/ | |
myLabel.fontSize = 30; | |
myLabel.position = CGPointMake(CGRectGetMidX(self.frame), | |
CGRectGetMidY(self.frame)); | |
[self addChild:myLabel]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment