cocos2d-iphone-3

Adding a Hud Layer to Scene Cocos2d-3

随声附和 提交于 2020-01-17 03:53:05
问题 To keep it simple, what is the easiest way to make the default [ Menu ] in default HelloWorld Scene (for example) as it's own layer. Issue I'm having now is that the scene is completely black, with nothing showing up! GameLayer node: - (id)init { // Enable touch handling on scene node self.userInteractionEnabled = YES; self.theMap = [CCTiledMap tiledMapWithFile:@"AftermathRpg.tmx"]; self.contentSize = theMap.contentSize; self.metaLayer = [theMap layerNamed:@"Meta"]; metaLayer.visible = NO;

why collision not working , cocos2d v3?

China☆狼群 提交于 2019-12-20 04:41:12
问题 i create simple game like flapy bird with cocos2d v3 . Interface class: @interface GameScene : CCScene<CCPhysicsCollisionDelegate> // ----------------------------------------------------------------------- + (GameScene *)scene; - (id)init; // ----------------------------------------------------------------------- @end In .m file: _physicsWorld =[CCPhysicsNode node]; _physicsWorld.gravity=ccp(0, 0); _physicsWorld.collisionDelegate=self; _physicsWorld.debugDraw =YES; [self addChild:

why collision not working , cocos2d v3?

空扰寡人 提交于 2019-12-02 03:45:44
i create simple game like flapy bird with cocos2d v3 . Interface class: @interface GameScene : CCScene<CCPhysicsCollisionDelegate> // ----------------------------------------------------------------------- + (GameScene *)scene; - (id)init; // ----------------------------------------------------------------------- @end In .m file: _physicsWorld =[CCPhysicsNode node]; _physicsWorld.gravity=ccp(0, 0); _physicsWorld.collisionDelegate=self; _physicsWorld.debugDraw =YES; [self addChild:_physicsWorld]; ......... bird.physicsBody=[CCPhysicsBody bodyWithRect:(CGRect){CGPointZero,bird.contentSize}