摘要: Introductioncocos2d supports both TTF (True Type Fonts) labels, and texture atlas labels.Pros and Cons of TTF labels: ( CCLabelTTF )All the pros of TTF fonts: any size, kerning support, etc.Easy to use. No need to use an external editor.The creation/update is very slow since a new texture will be cr 阅读全文
posted @ 2013-04-22 15:12 Jzong 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Menu vs. MenuItemsCCMenu is just a collection of CCmenuItems, and those menu items are what define the various buttons or labels you will have as part of your menu. Since the CCmenu contains all of the menu items, it controls the alignment and position of those items. By default,all of the menu item 阅读全文
posted @ 2013-04-22 15:06 Jzong 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1void SaveScreenshot() 2{ 3 CCSize size = CCDirector::sharedDirector()->getWinSize(); 4 CCRenderTexture* texture = CCRenderTexture::create((int)size.width, (int)size.height); 5 texture->setPosition(ccp(size.width/2, size.height/2)); 6 texture->begin(); 7 CCDirector::sharedDir... 阅读全文
posted @ 2013-04-22 14:37 Jzong 阅读(136) 评论(0) 推荐(0) 编辑
摘要: IntroductionCCString is inherited from the CCObject class. CCObject exist primarily as an automatic memory management object. CCString provided a series of interface such as create, convert etc..Useful MethodsCreation : 1 2 /** create a string with std string, you can also pass a c string pointer... 阅读全文
posted @ 2013-04-22 14:30 Jzong 阅读(321) 评论(0) 推荐(0) 编辑
摘要: IntroductionCCArray is a fully supported class of cocos2d. It is used for optimization in your game. You can find the CCArray class files in the cocos2d/Support group in the project. It’s used internally by cocos2d and is similar to Apple’s NSMutableArray class—except that CCArray performs better.No 阅读全文
posted @ 2013-04-22 14:08 Jzong 阅读(482) 评论(0) 推荐(0) 编辑