332 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
34
views
How to remove SKNode without causing a data race?
I am writing an iOS app with SpriteKit but I found conflicting information about removing an SKNode from its parent which puts me in a deadlock position.
Data races are specifically addressed in the ...
0
votes
0
answers
63
views
Adding a Mac trackpad scroll gesture to a SKScene
To scroll a SKNode (called scroller) within a SKScene (called menuScene), I'm doing the following, which works perfectly but I'm not sure if it's the correct way to achieve this.
Within the ...
0
votes
0
answers
52
views
Adding SKNodes into a ScrollView?
On Android, I've previously used CCScrollView (part of Cocos2D-X) to add nodes to a scrollable container, with all the extras like the elastic bounce, scrollbars, swipe gestures, etc.
But I can't work ...
0
votes
1
answer
95
views
SKNode not updating when text changes
I have an SKNode which contains 2 sub nodes (a sprite node w/an image and an SKLabelNode above the image which prints the number of available units).
Previously, after each time the USER 'spent' a ...
0
votes
1
answer
113
views
SKLabelNode, can't use "SFMono-Light" as font
im try to use the font "SFMono-Light" as font of my SKlabel.. but keep getting the error says "SKLabelNode: SFMono-Light" font not found.
func loadSKscene()->SKScene{ // load ...
2
votes
0
answers
35
views
Does SKNode have an actions property?
I wondered if there was an easy way to see a list of all actions currently assigned to a node in SpriteKit. Something like an "actions" property that will contain a list of all a node's ...
0
votes
1
answer
150
views
SKAction on a programmatically built node? How to target the node?
I had previously used a separate method for each character and wrote them in each scene file but it was messy and huge.
So in an effort to clean up code I wrote a buildCharater method to create the ...
1
vote
3
answers
123
views
I want to reduce the code in methods that are basically identical and pass in the parameters but don't know where to begin?
I have a spriteKit project where I have many characters across several scenes.
As a beginner I just built each one individually for each scene - which makes for a ton of extra code.
I know I could ...
0
votes
1
answer
123
views
Background Image not changing in Swift
So basically I am trying to have this app change its background when a button is pushed. The way I'm trying to do it is to set a variable 0 and if the button is pushed it will either make it 1 less or ...
0
votes
1
answer
109
views
SpriteKit - SKShapeNode from a loaded SKScene not rendered
I'm loading a SKScene from a file. In it, a SKShapeNode that I can see on the screen. But if set the "custom class" to a class like TestNode below, the ShapeNode won't be rendered: ...
2
votes
0
answers
44
views
Custom SKNode object is not shown | Swift
I programmed an SKButton class. The problem is that the button doesn't show up in my scene even though I added it to this one. I also programmed a joystick, but it is displayed. What did I do wrong?
...
0
votes
1
answer
24
views
How to retrieve an array with many spritekitnodes?
I store an array of spriteNode into an array spacecraftArray with the code as follows.
Later on, I need to access a specific item in the array. How do I do it?
There is no unique identifier or index ...
1
vote
0
answers
239
views
How to fill out an SKLabelNode with a specific color through animation?
I've been searching the internet for a while now and I couldn't come up with any solution.
I've created a SKLabelNode in my SpriteKit project which displays level numbers.
SKLabelNode:
let ...
-1
votes
2
answers
58
views
Cannot assign PhysicsBody and property to an SKSpriteNode?
I'm building a function in which a random variable will choose 1 in 4 SKSpritenode in an array and assign itself to it. However, that randomline, although appear as expected on the screen, does not ...
1
vote
1
answer
377
views
Running SKActions on Multiple SKNodes in Sequence
I am creating a card game and having trouble having SKActions run in a sequence across multiple SK Objects (Nodes, Textures, Labels, etc.). Any help would be much appreciated! In the example below, I ...