Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
48 views

Overview In my SKScene, I have a SKAudioNode playing an audio file, declared as follows: var backgroundMusic: SKAudioNode? and initialized like this: guard let musicURL = Bundle.main.url(...
0 votes
0 answers
67 views

I'm trying to call a function that takes in an Array as a reference spill(pool: &objectPool) And the function will make the array pops its first element to run some animations. Once the animation ...
0 votes
0 answers
72 views

I'm developing an app that moves a "grid" with Spritekit SKAction.move, based on frequent updates from ARKit. It crashes sporadically at camera?.run(moveToAction). Sometimes the app runs for ...
1 vote
1 answer
86 views

I am running the SKAction.rotate(to:) method on an SkspriteNode to animate the sprite's rotation. It works alright calling it whenever I need it to point towards a new location, however it rotates in ...
0 votes
1 answer
133 views

In my game built on SpriteKit the player has a set amount of time to complete each level, and on expiration either a game over method or a next level one is called. Since I know that using NSTimer ...
0 votes
0 answers
133 views

I am trying to make a Snake game in SpriteKit. I thought this would be super easy to do, while utilising all of SpriteKit's SKAction features such as timing modes, sequences, groups, etc. However, I ...
1 vote
1 answer
187 views

SpriteKit has an action called .moveBy(x:y:duration:). I wanted to try and implement this action myself and found it surprisingly difficult. static func moveX(by amount: CGFloat, duration: ...
1 vote
1 answer
87 views

In the documentation for SpriteKit, I found this: Generally, actions do not call public methods on nodes. For example, if you want to subclass SKNode to respond to a move(to:duration:) action, you ...
-1 votes
1 answer
54 views

I don't understand what is happening in this code... fileprivate func genericNodeWalker(_ direction:Follow, encapsulatedMethod: @escaping (_ iNode:Int) -> Void) { switch direction { case ....
2 votes
1 answer
130 views

I'm using SpriteKit for a 2D game and have an array of images for a simple animation. First, I'm creating an array with SKTextures to keep references to those images. var hyperLeapArray: [SKTexture] ...
0 votes
0 answers
71 views

I would like to have one piece of code in my app where I can track the textures of two nodes at a time. If the textures of the two nodes don't match I would like them reset back to their original ...
1 vote
1 answer
72 views

I have a number of enemies that spawn at separate times in my game, and move using SKAction but at the end of each level I have a boss that spawns in. When the boss spawns I want the other enemies to ...
1 vote
0 answers
50 views

I'm making a 2D scrolling shooter. I want one of the enemies to move randomly has they move down the the screen or in a zig zag kinda movement. The enemy pause's for half a second and at this point I ...
0 votes
1 answer
30 views

I have a game which is running well but as soon as I introduce a while loop my entire UI goes blank. I have some code which generates a sprite from an array and moves it down the screen func ...
2 votes
0 answers
35 views

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 ...

15 30 50 per page
1
2 3 4 5
...
45

AltStyle によって変換されたページ (->オリジナル) /