cocos2d-iphone
display part of an image and hide the rest using CCScene
ok so i have the following code : CCScene * timerLayer = [CCScene node]; [timerLayer setContentSize:CGSizeMake(50, 36)];[详细]
2023-04-11 19:26 分类:问答UIViewController is deallocating my Cocos2d scene in a weird way
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[详细]
2023-04-11 18:08 分类:问答Rotate b2Bodies in Box2d without messing up physics simulation
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[详细]
2023-04-11 17:46 分类:问答objective-c : iphone programming, add label over a scene cocos2d
i use this code to add a label in my cocos2d game CCLabelTTF *label = [CCLabelTTF labelWithString:@\"Hello World\" fontName:@\"Marker Felt\" fontSize:64];[详细]
2023-04-11 17:22 分类:问答Compile error in empty cocos2d 2.0 (iPhone)
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[详细]
2023-04-11 14:50 分类:问答How to simulate gravity for CCSprite?
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[详细]
2023-04-11 13:24 分类:问答How to stop previously running animation in Cocos2d
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[详细]
2023-04-11 11:53 分类:问答how to detect touch in a circle
I really assistance. Im a little confused. i have a circle sprite, and this code -(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event[详细]
2023-04-11 10:21 分类:问答how to update a value without adding it as a child to a scene
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[详细]
2023-04-11 09:56 分类:问答For collision detection only, is Chipmunk or Box2d the better tool?
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[详细]
2023-04-11 08:24 分类:问答