Questions tagged [sklabelnode]

Node that draws strings on iOS systems.

Node that draws strings on iOS systems.

https://developer.apple.com/library/IOs/documentation/SpriteKit/Reference/SKLabelNode_Ref/index.html

196 questions
2
votes
1 answer

An optimal way to Fade-In and Fade-Out SKLabelNodes

I am working on a small SpriteKit game. I have a "Tips" section on the Home Screen that I want to pulse in and out, each time displaying different Tips. I have a method that works, which I wrote myself, but it's messy and I'm sure there's an better…
Reanimation
  • 3,151
  • 10
  • 50
  • 88
2
votes
1 answer

Fade animation for SKLabelNode changing text

Okay so I have implemented a simple SKLabelNode with some text. I want to add a fade animation when I change the text. I know there is an easy way to do it with UILabels but I cant figure out how to do it with SKLabels.
Benja0906
  • 1,437
  • 2
  • 15
  • 25
2
votes
1 answer

Xcode: Add default custom font to SKLabelNode with Swift

I have searched everywhere, but I can only find how to change the UILabel fonts and can't find anywhere that teaches how to change the default SKLabelNode font. How do I do that in Xcode with swift? I have already added the font to the Info.plist I…
Sergio Toledo Piza
  • 793
  • 1
  • 6
  • 27
2
votes
1 answer

SKLabelNode crash

New class always crash on device iOS 9 with bad access on NewLabel(text: ""). Why? import SpriteKit class NewLabel : SKLabelNode { override var text: String { didSet { } } } * thread #1: tid = 0x8c839, 0x000000018577ce38…
Misha Vyrko
  • 992
  • 6
  • 14
2
votes
2 answers

How to create square SKLabelNode in Sprite kit

How am I able to create an SKLabelNode and set the width and height of it. I have thought about just making a sprite image with the word on and then position that sprite but I don't believe that this is the best way of doing…
2
votes
2 answers

Merge SKShapeNode and SKLabelNode

I would like to merge an SKShapeNode and an SKLabeNode to make only one node Here is my "Bloque" class who drawn an rectangle and add a sklabelnode child on it: class Bloque : SKShapeNode { var color : String! var numero : Int! var type…
Xakaa
  • 23
  • 2
2
votes
2 answers

How to animate an increasing number within an SKLabelNode

How would I go about making the increase of a number within an SKLabelNode animate? If you have played Clash of Clans you will be familiar with the animation that happens to your totals when you collect either Elixir or Gold. I.e. when I add 500…
Charls Pico
  • 61
  • 2
  • 9
2
votes
1 answer

SKLabelNode text with two different fonts and colour. How is this possible?

I have an SKLabelNode which is set up to show the Score Variable followed by the Highscore variable scoreLabel.text = "\(score)/\(classicHScoreInt)" Now, everything shows fine but i would like the classicHScoreInt to be a smaller font and maybe a…
LukeTerzich
  • 555
  • 1
  • 4
  • 17
2
votes
2 answers

Label not changing countdown timer SpriteKit Objective C?

Edit no.2 , Ok, I think I have boiled this right down to the point now. I have used all your advice, and tested with breakpoints, so thank you. The last bit I need to do, is run this wait action. if (timerStarted == YES) { [countDown…
user4103894
2
votes
1 answer

Setting text of LabelNode within an SKSpriteNode in Xcode

I have an SKLabelNode within an SKSpiteNode within yet one more SKSpriteNode. Purpose is to create a graphic with a blank button on it and then text for that button. I am able to create this but later in my code I want to change the text of this…
user2887097
  • 309
  • 4
  • 12
2
votes
1 answer

Does userInteractionEnabled property work correctly on SpriteKit nodes?

I have following simple code: // // BGMyScene.m // Test1 // // Created by AndrewShmig on 3/10/14. // Copyright (c) 2014 Bleeding Games. All rights reserved. // #import "BGMyScene.h" @implementation BGMyScene - (id)initWithSize:(CGSize)size { …
AndrewShmig
  • 4,843
  • 6
  • 39
  • 68
2
votes
1 answer

Draw a border around a SKLabelNode

I'm making an app in which I'm using SKLabelNode. I would like to put a border around it. This is my code sofar: SKLabelNode *scoreLabel; scoreLabel = [SKLabelNode labelNodeWithFontNames:@"Helvetica-Bold"]; scoreLabel.text = @"@"; scoreLabel.alpha…
dotnextgen
  • 21
  • 4
2
votes
2 answers

How to change text of a SKLabelNode?

How do I update a label's text that was created in initWithSize? Here is the code for the label within the initWithSize: SKLabelNode *scoreLabel = [SKLabelNode labelNodeWithFontNamed:@"TimesNewRoman"]; scoreLabel.text = [NSString…
user2975241
  • 73
  • 2
  • 7
2
votes
4 answers

colorizeWithColor and SKLabelNode

The SKAction colorizeWithColor: does as per the docs only work with SKSpriteNode, so what do we do with SKLabelNode? SKLabelNode does have both color and colorBlendFactor properties that can be set statically. Is there some way to animate this with…
Jonny
  • 15,955
  • 18
  • 111
  • 232
1
vote
1 answer

How to pass a string to a SKLabelNode in a SKScene(filenamed:) animation file?

Previously, I passed properties into my SKScene by creating initializers in my SKScene, then setting those initializers when i create my SKScene property in my SceneEditViewController. Did that make sense? I hope so. However, instead of creating an…
Ojay
  • 61
  • 12