I'm trying to update the coinLabel, so that when the "life" node is tapped, it will update the SKLabelNode and display the correct coins after they have been subtracted from the total. I'm new to coding, so if there is anything else wrong with this…
ok so first off I have an achievement Variable that is defined from a struct like so:
struct Achieve {
var node: SKSpriteNode?
var aName:String = ""
var aDes:String = ""
var aImage: String = "" {
didSet {
node?.texture =…
I am trying to get an SKLabelNode to show up on my screen, but it doesn't show. Here is my code...
override func didMoveToView(view: SKView) {
let textLabel = SKLabelNode(fontNamed: "Avenir-Black")
textLabel.text? = "HI THERE"
…
How can I extract the polygon path from a SKLabelNode? For example I want the edge path of a number like this to move along a SKSpriteNode:
Do you think is possible? Or I must create a polygon for each character like:
var pathNumberOne =…
So I was just messin around in xcode and I ran into a problem. I created a system where every time the user touches any where on the screen it creates a SKLabel with a random color where the user touches. How could I have the SKLabels that are…
Im creating a game and i have created and integer which keeps track of the number of enemies killed, however i can not get the sklabel on the UI to update. no matter how many enemies the integer kept displaying 0. Here are some of the methods i…
I am creating a game and I am trying to keep a record of all enemy's killed but my SKLabel node is not updating. Here's how I'm implementing it
class GameScene: SKScene, SKPhysicsContactDelegate {
var Enemy1KillCounter:Int = 0
var…
I don't know why, but score label node dissapears after first round.I have two scores, one for human ,other for computer :
-(void)scoreCount{
if(scoreLabel == nil){
NSString* scoretxt =[NSString stringWithFormat:@"0"];
[scoreLabel…
I want to use a pixel font in my SpriteKit game.
But I can't use a bitmap font because I need to support many languages (too many characters).
So I should use a ttf font file.
I tried the following code, but characters were blurred by…
I'm making a scene in which the lyrics to a song which is played in the background of a scene are displayed line by line at the bottom of a spriteKit scene. I've tried a number of different solutions, but for some reason with each of them some of…
I have a class called IntroLayer I'm trying to load as the inital scene when my game is launched. However after simply changing the GameScene to IntroScene as described in these simple steps, my IntroScene isn't being loaded. I set breakpoints on if…
I have these two UITextFields and the first texField subtracts the number from the second textField. It then takes the answer and puts it in my SKLabelNode. That works fine. But the problem Im having is that it doesn't save the label. When I quit…
I'm new to SpriteKit and Swift (done a lot in Obj-C in the past for iOS) but I'm struggling on something that should be very basic.. positioning sprites on the screen!
Centering a label on the screens seems easy enough:
myLabel.position =…
I'm using an SKLabelNode to display a score on a universal game. The font size is perfect for iPhone but naturally needs to be bigger for iPad. I was wondering if there is any way to change the font size just for iPad? I tried this in didMoveToView:…
While I was running my program I noticed at the part of the code where I declared a SKLabelNode and filled out its attributes, the program was hanging there (I knew this due to NSLog statements). What I saw was that I spelled 'Arial' wrong, instead…