I am trying to add a SKLabelNode to the top left of my scene. Currently I am achieving this using a value of "300"
func addMoneyLabel() {
let moneyLabel = SKLabelNode(fontNamed:"Copperplate")
moneyLabel.fontSize = 25
…
A label has four different verticalAlignmentMode: .Baseline, .Bottom, .Center and .Top.
I would like the label to be centred on its position according to its baseline. .Center doesn't work for me because the bottom of the frame isn't the baseline of…
I want to to animate appearance of Label's text so that it looks like it is being typed in at the moment. I was wondering if there is a relatively easy way to do so in SWIFT. Thank you.
Can't find in web, how to make SKLabelNode cropping SKShapeNode. When i colorize the background, my goal is colorize the label too with the same method, so both of them have to colorize simultaneously. But can't imagine how to crop SKShapeNode with…
I am pretty much sure that for this can't be used NSMutableAttributedString and NSAttributedString. What I've tried is:
NSMutableAttributedString * newString = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"];
[newString…
I'm developing an os x / iOS crossword game which uses SKLabelNode to display the crossword letters as a child on a SKNode subclass.
So for each letter there is SKNode.SKLabelNode. Without using SKLabelNode the draw counts are in the range of 6-8.…
I'm using SKLabelNode. I'm creating it and add it to my scene as a child and it displays with no problem, but when I try to change it's color (not fontColor) with the colorizeWithColor() method the label fades out.
Here is the line with the…
I have a collection of SKLabelNodes. Each node represents a letter of a word. Each node is the child of an SKSpriteNode. The spriteNodehas an explicit hight set on it (the hight returned by [text sizeWithAttributes:@{NSFontAttributeName : font}];),…
I'm trying to create buttons programmatically. I have subclassed SKSpriteNode and one of its children is an SKLabelNode. The reason I did this is so that the label and button move together and are one unit. The problem is that when I scale the…
Hi I'm using a custom font on a SKLabelNode.
I'm able to set the font colour but ok, but the inner parts of the text, are transparent.
Is there a way i can set this colour to white for example?
my code so far
scoreLabel.fontColor = [SKColor…
I am making a game in SpriteKit for macOS using Swift, and due to my pixel art style, my SpriteKit scene has a size of 384 x 216, and I have relied on my scale mode to fix everything in fullscreen.
I realize that my pixel art becomes blurry with…
I am trying to get center some text at the center of the scene with a specific size.
func addCubeExperienceLabel(_ buttonSize : CGSize, _ buttonPos : CGPoint, _ world : Int) {
let price = SKLabelNode(fontNamed: "LCDSolid")
price.text =…
I want to change the text of a SKLabelNode created in the scene editor named myScoreLabel to update a score on collision of two objects. Here's the relevant code:
class holeOne: SKScene, SKPhysicsContactDelegate {
var myScoreLabel:…
I'm adding an old-school high-score entry screen to my game, in which the users tap each letter to enter their name.
Each letter, symbol or phrase ('DEL', 'SP' etc) is a single SKLabelNode and it's very difficult to tap on the ',' and '.'…
My Goal: add one to the amount variable of the Achievements Class and then update the text so it shows on the SKLabelNode called "AmountLabel"
So I have a subclass of SKNode that shelters my SKSpriteNode that shows the emblem of the achievement and…