问题
I have worked with cocos2d before, that was simple game with moving objects (CCSprite), but now I want to make a bubbleshooter game , Can anyone briefly give me idea how it will work, the flow of game and what should I use, like as I think there will be on layer, and CCSprite over it, but still not clear idea in mind
I would be thankful if someone will describe the whole flow, and classes, more briefly I will specify some major points
- What are bubbles used in game? (Image with CCSprites or something else)
- How would I know the direction of shooting.
- How would I know the collision is occured, and other balloons of same color connect to hitting balloon will also be vanished.
I would be thankful if someone provide the related task tutorials or source codes, so that I would get better idea about it.
回答1:
- Bubbles are sprite Images.
- Read this link http://www.raywenderlich.com/692/rotating-turrets it gives how to find the direction of Touch position.
collision detection as usual.In scheduler method find if the Moving ball is collide with other ball.
-(void)checkCollision { for(CCSprite *ball In ballArray) { if(CGRectIntersectRect([ball boundingBox],[movingBall boundingBox])) { CCLOG(@"collision Occurs"); } } }
来源:https://stackoverflow.com/questions/8076096/cocos2d-bubble-shooting-game