ok so i have the following code : CCScene * timerLayer = [CCScene node]; [timerLayer setContentSize:CGSizeMake(50, 36)];
I have a Cocos2d game scene that loads with an EAGLView loaded by a UIViewController, but when I exit the game scene back to a UIKit Menu, my game scene is being deallocated in a weird way. I think if
I have made a biped using box2d. The soldier has a gun, which is a b2Body and is attached to the soldier\'s arm using a b2Joint. I want to rotate the gun to point in the direction the soldier shoots w
i use this code to add a label in my cocos2d game CCLabelTTF *label = [CCLabelTTF labelWithString:@\"Hello World\" fontName:@\"Marker Felt\" fontSize:64];
When I try to compile new cocos2d+box2d project in xcode4. I got error message like: /Users/bla-bl开发者_运维百科a/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCDirector.h:32:9: fatal error: \'kazma
Currently I am using UIKit in my app but I decided to make the switch to Cocos2D, right now I am trying to implement gravity but I am having trouble doing so. I have googled this and have not found mu
I\'m making a game using cocos2d. I\'m moving sprites by applying the CCRepeatForever action in ccTouchBegan method and when the sprite collides with another sprite, the collision animation is at in
I really assistance. Im a little confused. i have a circle sprite, and this code -(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
so i am trying to update the score in my game, and the code is running fine but the structure doesnt seem right to me. what I am doing right now is keeping the score in a var and then removing the old
For a Cocos2d based project, I\'d like to use a physics toolkit for collision detection only.What are th开发者_如何学Pythone pros/cons of using Chipmunk or Box2d?According to this answer Chipmunk does