Questions tagged [ccscene]

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

24 questions
1
vote
1 answer

Cocos2d: Activity class & CCLayer class

Im building a game using eclipse and now I wanted to use Cocos2d engine. My problem is I want to merge my done program and sliding menu of cocos2d engine. And now my question is how can I extend my Menu Class to Activity class so I can call onCreate…
1
vote
2 answers

Unable to cast CCScene

I am trying to load a CCScene and then change some of it's properties before using the scene. When I try to change it's properties it says [CCScene setProperty] - unrecognized selector sent to instance, even though I casted the CCScene to the…
João Abrantes
  • 4,772
  • 4
  • 35
  • 71
1
vote
4 answers

Cocos2d-x crash due to ccLayer->schedule(schedule_selector(...), ...);

I have Android development background. A few days ago, I started to learn Cocos2d-x for game development. I was creating a simple splash screen and some menu screen but got stuck on some app crash issue. I want Splash Scene to stay for 3 seconds and…
Khawar Raza
  • 15,870
  • 24
  • 70
  • 127
1
vote
2 answers

how to close layer that showed in other layer in cocos2d-iphone

I have one layer called alayer, and there is a button called abutton, when click the button, another layer called blayer will show in alayer, not replaceScene, please look at the following code, alayer.m -(void)abuttonclicked:(id)sender { blayer…
yegomo
  • 297
  • 2
  • 11
1
vote
2 answers

Communitacting between CCLayers in one Scene

I have 2 CCLayers that needs to communicate with each other in separate .m files Level1.m (CCScene with Level1 CCLayer) - Holds tiled map and player sprite HUDLayer.m (links to top of Level1.m) - Holds all buttons How can I get the following code…
Troy R
  • 426
  • 2
  • 16
0
votes
1 answer

Code Composer Studio MSPFR6989 variables&expressions won’t come up

I am using CCS to program a MSPFR6989 and I’ve debugged and the code is working but I can’t get variables or registers to come up. It remains blank. enter image description here
0
votes
1 answer

Resizing visual area of ccscren object in OSX

I have created a fairly simple graphics program by starting with the PeevedPenguin project using iPad as target and then trying to retarget it to the Mac. I am using current versions of Spritebuilder, Cocos, and Xcode. When I move over to the Mac…
stoshb
  • 65
  • 1
  • 11
0
votes
0 answers

Handle Button in CCNode from CCScene

I'm creating a game in cocos2d v3. In the CCScene, I add a CCNode that contains all the components for my HUD. In the CCNode, there are CCButtons added. I want to be able to handle the touch of these buttons in my CCScene. Is that possible? And if…
SpellChucker
  • 450
  • 5
  • 18
0
votes
0 answers

iOS - Transition with scene error

I am working on an application, which uses cocos2D. It works very well, but I have a problem during some transitions. Sometimes, I get an error when I use: [[CCDirector sharedDirector] replaceScene:[Menu scene]]; I get: Unbalanced calls to…
user1833903
  • 187
  • 3
  • 16
0
votes
2 answers

Know when CCScene is shown after scene on top of stack is popped

Using `cocos2d-x, say I am on Scene 1 and I add a new scene (Scene 2), but I later pop that scene: CCDirector *pDirector = CCDirector::sharedDirector(); pDirector->popScene(); How do I know when Scene 1 has appeared again? Is there any…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
0
votes
1 answer

something similar to viewDidLoad in Cocos2d

I want to do stuff in my scene when it is transitioned to. Is there anything in cocos2d similar to viewDidLoad that is called when I switch to a scene or layer? Thanks
Connor Pearson
  • 63,902
  • 28
  • 145
  • 142
0
votes
1 answer

Set the Camera Position CCScene

I've come across an issue with my CCScene. I'm trying to set the position of my scene on the player block. Here is my init for my scene: - (id)init { // Apple recommend assigning self with supers return value self = [super init]; if…
user3238439
  • 49
  • 1
  • 5
0
votes
1 answer

odd behavior when transition of different scenes

I hope to make some custom picture(e.x some logo and information of the game developer)before game is launched.In the cocos2d temple,there is only a IntroLayer to show logo,so I decide to add more scene to display other information before entering…
0
votes
1 answer

Set Background to CCScene

How could I set a background to the CCScene? What I want is when I zoom out or in my CCLayer the background size stay the same. Thanks in advance.
Vervatovskis
  • 2,277
  • 5
  • 29
  • 46
0
votes
0 answers

cclayer function called error

I have two layer called alayer and blayer, alayer is parent there is a function in alayer.h - (void)playGame; in alayer.m, add blayer - (id)init { if ([super init] == self) { Blayer *bLayer = [[bLayer alloc] initWithParent:self]; [self…
yegomo
  • 297
  • 2
  • 11
1
2