如何不使用任何框架来显示边框。只是普通的cocos2d?
发布于 2013-09-08 10:41:37
在Cocos2d中非常酷的特性,搜索ccConfig.h,您可以在这里找到以下部分:
/** @def CC_SPRITE_DEBUG_DRAW
If enabled, all subclasses of CCSprite will draw a bounding box.
Useful for debugging purposes only. It is recommended to leave it disabled.
If the CCSprite is being drawn by a CCSpriteBatchNode, the bounding box might be a bit different.
To enable set it to a value different than 0. Disabled by default:
0 -- disabled
1 -- draw bounding box
2 -- draw texture box
*/
#ifndef CC_SPRITE_DEBUG_DRAW
#define CC_SPRITE_DEBUG_DRAW 0
#endif将行#define CC_SPRITE_DEBUG_DRAW、0更改为1。每一个CCSprite,所以CCLabelTTF现在也有一个白色的发际线边框。
https://stackoverflow.com/questions/18682422
复制相似问题