Questions tagged [ccscene]

CCScene is a subclass of CCNode that is used only as an abstract concept.

24 questions
0
votes
2 answers

How to replace CCScene while UIViewController is presented?

I have two CCScenes, let's call them A and B. When i'm on the scene A i present an UIViewController instance with video player. Then i want to move from that UIViewController to the scene B. This is how i do that: -…
Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161
0
votes
0 answers

Is CCScene replace during CCTransition possible?

Calling replaceScene: with a CCScene on CCDirector which is during a CCTransition results in dealloc not being called on any scene used, moreover, after this operation any scene is not being displayed. Here is a link to the sample project Shortest…
Wladek Surala
  • 2,590
  • 1
  • 26
  • 31
0
votes
0 answers

iOS, cocos2d. Debug info about current node, layer, scene using a category?

I found this code: link It shows a label about a class of current UIViewController. How to realize the similar thing for cocos2d? It is enough easy with subclassing but is enough hard with a category. And if I use subclassing for an existing project…
user2083364
  • 744
  • 1
  • 7
  • 20
0
votes
2 answers

Cocos2d scene loaded with wrong orientation

I'm trying to make a cocos2d scene on top of some UIKit views. I understand that the cocos2d 2.0 CCDirector is a subclass of UIViewController so that I can just add that as a subview. I've written this function to handle switching to a scene in my…
David Zhang
  • 346
  • 2
  • 13
0
votes
0 answers

Why cant i move an iAd from a HUD layer?

I have a HUD layer containing an iAd with a function that moves the ad offscreen. I use this code to add the HUD layer to one of the scenes I have: CCScene *scene = [CCScene node]; hudLayer *hud = [hudLayer node]; [scene addChild:hud z:1…
Arbitur
  • 38,684
  • 22
  • 91
  • 128
0
votes
1 answer

ViewController access the instance method in CCScene created by CocosBuilder?

Let me give an example to illustrate: e.g. in CocosBuilder, I have created a Scene.ccbi and its custom class Scene class Inside Scene header, I have defined a method: -(void) doSomething; In AppDelegate/ViewController, I call CCBReader to create…
MobileDev
  • 178
  • 3
  • 14
0
votes
1 answer

Game crashes after second time same CCScene is replaced

It is a bit simple problem but i could not figure it out. 1-> Application Starts (with MainMenu scene) 2-> Start (Sub levels scene is replaced) 3-> Select First Level (Level1Scene is replaced. Game started.) 4-> Get back to main menu. (MainMenu…
Quaso
  • 373
  • 1
  • 6
  • 18
0
votes
1 answer

cocos2d scene deallocation and ccb nodes

I have a simple CCScene containing only one node created from a CocosBuilder template with [CCBReader nodeGraphWithFile:] method. So far, I did not release the ccb node in the dealloc method of the scene because I expected it to be autoreleased. But…
sdabet
  • 18,360
  • 11
  • 89
  • 158
-1
votes
1 answer

How can load a cocos2d scene from view controller class?

1)I made a game using cocos2d-iphone v3. 2)I integrated a fullscreen advertisement. 3)I want to load a cocos2d scene, when user closes ad, but it doesn't work(I imported cocos2d framework).There is just a black screen after advertisement disappears…
user3475724
1
2