有没有办法在cocos2d iPhone库中创建带圆角的CCLayer类的子类?也许一些解决方案已经存在了?有什么想法吗?
谢谢。
发布于 2013-08-03 01:32:33
我在这里得到了原始代码:A-roundedrectangle-ccnode-extension在cocos2d中不起作用,2.0..So做了一些更新。
这是我的圆角图层的代码:
int layer_width = 200, layer_height = 100;
CCRoundedRectNode *shareRectNode = [[[CCRoundedRectNode alloc]
initWithRectSize: CGSizeMake(layer_width, layer_height)] autorelease];
shareRectNode.position = ccp(s.width/2-layer_width/2, s.height/2-layer_height/2);
shareRectNode.fillColor = ccc4f(0.0, 0.0, 0.0, 0.9);
[self addChild: shareRectNode z:3];https://stackoverflow.com/questions/18022489
复制相似问题