开发者

Transparent CCColorLayer in cocos2d xcode

开发者 https://www.devze.com 2023-03-08 17:10 出处:网络
I have a game, where on click on one button i load one CCColorLayer. Once i load it, it has some background image. I want the main screen where i clicked the button should also be there when the new l

I have a game, where on click on one button i load one CCColorLayer. Once i load it, it has some background image. I want the main screen where i clicked the button should also be there when the new layer is opening.

So say new layer's name is image2.png and i already have image1.png. Then image2 is getting loaded on image1. image2 size is开发者_开发问答 less than image1. So whatever parts are visible of image1 i should be able to see meaning by image2 should be transparent. And all these images are in CCLayer background.

Any helps is really appreciated.

Thank you,

Anks.


Sounds like you need to set the size of the layer to be smaller than the first layer, or set the CCLayerColor to be transparent and load the second image as a sprite within that layer.


I just created different scene on same layer as transparent layer is not possible.

0

精彩评论

暂无评论...
验证码 换一张
取 消