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
1
vote
1 answer

Removing specific nodes in SpriteKit

Need some help as a beginner: I've got different nodes: 4 squares (sprite1) and 1 counter (counterLabel, counts the nodes, which have been removed). I want to remove the 4 squares by touching them. With the code below the squares can be removed, but…
George
  • 367
  • 1
  • 3
  • 4
1
vote
2 answers

SKLabelNode when added to class throws attempted to add nil node error

I'm following along this Spritekit tutorial http://code.tutsplus.com/tutorials/ios-sdk-build-a-facts-game-interface-creation--mobile-20764 And they suggest to add a timer's text in the viewDidLoad Method. The code that is given in the tutorial…
Linda Keating
  • 2,215
  • 7
  • 31
  • 63
1
vote
0 answers

SpriteKit / UIKit - Navigating between SKScene and View Controller

I have a game with a menu screen. The menu options are SKLabelNodes in a scene. My settings / options screen is in a view controller which containes UIKit sliders and switches. What's the best way to link from a label node on the main menu to the…
MegaTron
  • 3,133
  • 6
  • 28
  • 45
1
vote
2 answers

SpriteKit Label Node not appearing

I have a strange problem. I am using a label node in one of my projects. Last time i was adding a custom font and from that moment my label nodes are not working properly. If I set a Font to my label (like in example under this text), label just…
MOzeb
  • 423
  • 1
  • 6
  • 14
1
vote
2 answers

How to update SKLabelNode color after the node is initiated?

I have SKLabelNode in my Swift-code. I need to change the Label's color during SKAction. Simply: override func didMoveToView(view: SKView) { ... var color = UIColor(red: CGFloat(1.0), green: CGFloat(0.0), blue: CGFloat(0.0), alpha:…
user3673836
  • 591
  • 1
  • 9
  • 23
1
vote
1 answer

SKLabelNode update at touch

I'm trying to find the cause of a weird behavior. My SpriteKit scene have a SKLabelNode as property. The SKLabelNode is initialized in a method called levelSelected : -(void)levelSelected{ SKSpriteNode* bar = [SKSpriteNode…
1
vote
3 answers

Make a SKLabelNode in spritekit appear above all other sprites

Hi im pretty new to programming and I have encountered a small issue. I am creating a simple game which has a score label. However, the score label is covered whenever a downward scrolling obstacle passes. I would like for the score label to not be…
1
vote
1 answer

SpriteKit reducing SKLabelnode draw calls

So I have a scene in my game which displays the levels, like any other game with level, I subclass SKSpriteNode to make a custom level button and within this subclass i Add a SKLabelNode to display the level title ( level 1, level 2 .....). The…
1
vote
1 answer

SKLabelNode not appearing on actual device

I am writing a spriteKit program in swift and want to have a score label in the corner of my screen, so that the user can monitor their points. I have the following code: var scoreLabel = SKLabelNode() . . . init(size:CGSize) { super.init(size) …
DShaar
  • 155
  • 2
  • 6
1
vote
1 answer

SpriteKit displaying variable number

What is the best way to display some value (that changes as the game runs) on the screen in iPhone SpriteKit? The only way I can think of is SKLabelNode, but it's probably not meant to be used like this and also I can't find any way to measure its…
Fiodor
  • 796
  • 2
  • 7
  • 18
1
vote
0 answers

Gradient/Outline Font SpriteKit

I am wondering how people currently implement Gradient/Outlined fonts in SpriteKit or if not is there any way to do this. I seen this question: What would be the best approach for outlining or dropshadowing a font? But there were no real answers for…
Dave3of5
  • 688
  • 5
  • 23
1
vote
1 answer

Why is Sprite Kit Text Resolution Slightly Pixelated?

I was thinking of putting adding a UITableView to a SKView, but I read the answer here which mentioned it would be 'crude': Sprite Kit Table View I tested it, and the text in the tableview is slightly pixelated. Out of curiousity, I also made a…
Narwhal
  • 744
  • 1
  • 8
  • 22
1
vote
2 answers

SKLabelNode change number of lines

Is there a possibility to change the number of lines of an SKLabelNode? Like UiLabel: UILabel *label = [UILabel new]; label.numberOfLines = 2;
user3138007
  • 637
  • 1
  • 6
  • 19
1
vote
0 answers

ios SpriteKit: how to make SKLabelNode object alway on top in a SKView

SKView has some SKSpriteNodes and a SKLabelNode. And SKLabelNode alway show some help info text. While SKSpriteNode object moves in SKView and sometimes it will hide the SKLabelNode. Is there any method to make the SKLabelNode always on the top…
Qijin
  • 307
  • 2
  • 13
1
vote
0 answers

iOS SpriteKit headache; runAction:completion: not triggering completion block

I'm looking to make a pause on touch for a SprintKit game. When the game is paused a label is shown with PAUSE as text until the user touchUp the screen again to un-pause. When the game un-pauses a countdown from 3 will be displayed prior to the…