Questions tagged [skscene]

An SKScene object represents a scene of content in Sprite Kit. A scene is the root node in a tree of Sprite Kit nodes (SKNode). These nodes provide content that the scene animates and renders for display. To display a scene, you present it from an SKView object. SKScene is Apple technology for use on iOS 7.0 and later.

An SKScene object represents a scene of content in Sprite Kit. A scene is the root node in a tree of Sprite Kit nodes (SKNode). These nodes provide content that the scene animates and renders for display. To display a scene, you present it from an SKView object.

A scene calculates the contents of a new frame by processing the following actions in order:

  • The scene calls its update: method.
  • The scene executes actions on its children.
  • The scene calls its didEvaluateActions method.
  • The scene executes any physics simulations on physics bodies in the scene.
  • The scene calls its didSimulatePhysics method.

Click Here for Apple's Documentation Reference for SKScene.

653 questions
0
votes
0 answers

two SKScene Objects with separated View orientation

I assumed would have two SKScene objects. The first SKScene should only support the portrait view and the second SKScene should only support the Landscape view and are actually started by the first SKScene. Can this be so implemented, or does it…
0
votes
1 answer

Change background colours of a SKscene after it has been presented using a timer

So I have setup a skscene within a Skview on an app I'm testing. I setup the background color etc like so. SKView *skBG = [[SKView alloc] initWithFrame:self.view.bounds]; SKScene *scene = [SKScene sceneWithSize:self.view.bounds.size]; …
Adam Ware
  • 1,202
  • 11
  • 17
0
votes
1 answer

Using a UICollectionView over an SKScene

I have an app with several SKScenes. To keep it snappy, I have a single UIViewController, that handles 1 SKView. I'm trying to add a UICollectionView to one of the SKScenes. However the problem comes when I try to set the delegate for the…
Smikey
  • 8,106
  • 3
  • 46
  • 74
0
votes
3 answers

Referencing a scene from another class in Sprite Kit

Ok, i've been trying to figure this out and searching the web and the forum but I haven't had any luck yet. What I want to do is the following. I have a MainMenuScene which is a SKScene. Since I have added a number of SKActions and other things in…
μ4ρκ05
  • 585
  • 2
  • 5
  • 16
0
votes
2 answers

Sprite kit scene above UIView

My final goal is to start on a UIView, go to a SKScene, then back to a UIView. Because this seems to be very difficult my next idea is to leave the UIView active behind the SKScene then change the .hidden value of the SKScene to go from one to the…
Lucas Bullen
  • 211
  • 5
  • 14
0
votes
2 answers

Presented SKScene changes back to start scene when changing the device orientation

i have a Problem with Sprite kit using more than one SKScene. Every time when I change the device orientation, sprite kit presents the first SKScene. When I flip the iPhone, the game scene disappears and the device is showing the menu scene. How…
Banjalucan
  • 115
  • 1
  • 9
0
votes
0 answers

SKAction not working while [SKScene enumerateObjectsUsingBlock:]

I'm going to add some SKAction animation before delete nodes from my SKScene. When I'm trying to do it, SKAction executed just at first 2-4 sprites from 10-40. If I commented [node runAction:action]; and just put [node removeFromParent]; all works…
iiFreeman
  • 5,165
  • 2
  • 29
  • 42
-1
votes
1 answer

Message of: "libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) in my console when I press button in swift xcode project

I get this message: "libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)" in my console whenever I press my button in my program. I'm not sure why this is happening... Here is my code for the button: class gameOverScene:…
AglaiaZ
  • 31
  • 6
-1
votes
1 answer

Go to Gamescene back to viewcontroller

I have a simple game. there are two Viewcontroller. after pressing "play" on the first viewcontroller i have performed a segue to the secondviewcontroller. this secondviewcontroller contains a GADBannerView and a button to stop the game and …
-1
votes
1 answer

Swift: Problems with loading SKScenes

I'm have a game, and I'm trying to load a scene other than GameScene. That scene is called MenuScene. I have both a .sks file and .swift file for MenuScene, both called MenuScene. Running the following code in GameViewController, I can at least load…
Jean Valjean
  • 747
  • 1
  • 9
  • 30
-1
votes
2 answers

Present another view controller scene created in main.storybord from a SKScene

I'm struggling trying to present a view controller called GameEndViewController, I have created in main.storyboard with som buttons and labels using auto layout from a SKScene called PlayGameScene. I don't know how to use NSNotificationCenter to…
Kasper Hansen
  • 72
  • 1
  • 10
-1
votes
1 answer

Why [SKAction runBlock:^(void){}] never works?

I'm trying to make infinite number of coins which drop down one by one (with equal spaces made by waitforduration: method) and for some reasons I couldn't figure out, [NSTread sleepForTimeInterval:] didn't work well in sprite kit (the gap between…
user5695306
-1
votes
2 answers

How to delete object after it gone outside the scene?

I am trying to delete the objects after it go outside the scene so so i can extenuate ram consumption I should put the code i have tried but i dont know how to begin so i have nothing to put here sorry EDIT Or maybe i should detect if the object…
RUON
  • 163
  • 9
-1
votes
1 answer

dismissing a textview that is added as subview programmatically in scene

as the title suggests i have added a UITextView to my scene and it works fine. the only issue i have is when i use the back button to go back to the main menu the text view remains on the screen. for the life of me i can't figure out how to prevent…
Adrian P
  • 6,479
  • 4
  • 38
  • 55
-1
votes
3 answers

Adding sound to spritekitgame upon gameover transition

I made a game with sprite kit. Now I am trying to implement some sound effects. I managed to do some sound effect but I got stuck at the part where I have to implement a sound whenever you lose. So you lose when an object touches the ground. But…
Romano Vacca
  • 305
  • 1
  • 4
  • 11
1 2 3
43
44