Question

I have a main CCLayer which is covering the start up screen, and then I added one more CCLayer and set it's width and height to my requirement. Target class of added layer is another class different from main CCLayer. So I want when user clicks on the the adde CClayer it should call its MotionBegin method. But when I try to run the program its give me error. I am working on COCOS2D-X in C++, and using COCO Builder to add CCLayer over the .ccbi files. Can anybody tell me how can I add the new CCLayer over another layer? MY program with main CCLayer works fine but I have to add another layer.

Was it helpful?

Solution

In last cocos2d-x versions it worked ok.

OTHER TIPS

Till cocos2d-x version 2.1.2 you can't add a CCLayer over another if both of the CCLayers have different custom classes. May be there is support for this in the latest edition.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top