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
0
votes
2 answers

Trouble using a subclass of SKLabelNode

I've written a custom subclass of SKLabelNode which should apply a rudimental "drop shadow" to my label: class ShadowLabel: SKLabelNode { var shadowNode: SKLabelNode init(fontNamed font: String = "Foo", text: String, size: CGFloat,…
gionti
  • 96
  • 5
0
votes
1 answer

SKLabelNode Moves. But action does not repeat

I have created a Test Scene to practice some basic Swift 3 and SpriteKit. I'm trying to learn by understanding the basics before moving on to more complex goals. Here I have a SKLabelNode that is created and then moves to the left. I have created a…
Martin Jones
  • 123
  • 7
0
votes
1 answer

Positioning sprites relative to their parent

-(void)drawGUIForPlayer:(PlayerClass *)player { SKShapeNode *outlineBox = [SKShapeNode shapeNodeWithRect:CGRectMake(0, self.view.frame.size.height - 60, 150, 30)]; outlineBox.fillColor = [SKColor colorWithRed:0 green:0 blue:1 alpha:0.3]; …
Daniel
  • 285
  • 3
  • 12
0
votes
1 answer

Creating "fly-in" effect in Sprite-kit for SKLabels

I would like to create this effect: http://d.pr/v/4oGc Here in details: in sprite-kit with SKLabelNode. So basically I would like the labels to "fly in". My first thought was to use SKAction for this but I didn't figure out if it actually can be…
user594883
  • 1,329
  • 2
  • 17
  • 36
0
votes
1 answer

Trying to delay spawn nodes using waitForDuration in didMoveToView with SpriteKit Scene (SWIFT) but not working

I'm trying to stop my nodes from falling just for a second or two at the start of my game. So my problem is when I push start the nodes are already halfway down the screen. I also tried changing how high the nodes start but it seems like a costly…
0
votes
1 answer

App freezes after second point, Objective C

I want to make small game like 'Ping Pong'. Everything was working fine, but now, when I want to add a score, the game freezes. I used this code for another project of mine and everything was fine. Here is the code for the score part…
artG
  • 235
  • 3
  • 12
0
votes
1 answer

SKLabelNode higher when it contains (q,y,p,g or j)

For exemple I have two SKLabelNode: "Easy" and "Medium" I set them at the same height but because easy contains a 'y', it is higher because of his tail How can I put them at the same height?
Clément Bisaillon
  • 5,037
  • 8
  • 32
  • 53
0
votes
1 answer

run an SKAction based on the character count of an SKLabel node's text

I have a game scene that consists of animations that occur in sync with the content of a song. One of the actions I'm trying to set up is in relation to the lyrics of the song which are displayed using an SKLabelNode. What I want to do is is toggle…
derekFairholm
  • 285
  • 1
  • 14
0
votes
2 answers

Animate a number changing in SpriteKit

I'm using Swift and SpriteKit. I want a number to change from 20 to 10. I want while its changing to display the changing of the number. To be more specific, I want 19 to show for 0.1 seconds, 18 to show for 0.1 seconds, and so on.
Anton O.
  • 653
  • 7
  • 27
0
votes
1 answer

Unable to draw SKLabelNode in front of UIView

I'm adding a SKLabelNode in my GameScene.swift by using the following code let scoreLabel = SKLabelNode(fontNamed: "GillSans-BoldItalic") scoreLabel.fontSize = 25 scoreLabel.text = "Text" scoreLabel.position = position …
Alexandros
  • 533
  • 2
  • 7
  • 15
0
votes
1 answer

My Xcode app for OS isn't opening on some other Macs

I'm creating an app for OS X, and it's basically finished. To test it out, I have tried it on other macs. I have tried several methods of sending the app to the other macs, but they end up with the same result. The methods include sending the .app…
Shuri2060
  • 729
  • 6
  • 21
0
votes
2 answers

How to make text the same size on all devices in SpriteKit?

In SpriteKit, is there a way to make an SKLabelNode look the same size, regardless of the device, eg: Looks the same size on a iPhone 5 as a 6Plus? I've tried using this method someone else recommended: let textRect = CGRect(x: 0, y: 0, width:…
user5669940
0
votes
1 answer

SKLabelNode sometimes disappear in iOS 9.2

I have a node with a picture of a box added right on top of another node with image of an airship: SKSpriteNode *box = [SKSpriteNode spriteNodeWithImageNamed:@"Box"]; box.position = airshipNode.position; box.physicsBody = [SKPhysicBody…
Tom Shen
  • 1,838
  • 3
  • 19
  • 40
0
votes
1 answer

How to save the highscore properly

Apologies if Ive already asked this, but Im having a very hard time. I have an SKLabelNode set up like this: var label = SKLabelNode(fontNamed: "Baveuse") class GameScene: SKScene { func pointsLabel() -> SKLabelNode { label.position =…
Rae Tucker
  • 523
  • 1
  • 6
  • 16
0
votes
1 answer

Connecting an SKLabelNode to a game over SKScene label text

I have an SKLabelNode that increments by one point every time my player touches an object: let scoreLabel = childNodeWithName("points") as! Points scoreLabel.increment() However, I have an SKScene that pops up when my player hits an enemy. In the…
Rae Tucker
  • 523
  • 1
  • 6
  • 16