Anks
Anks

Reputation: 225

Transparent CCColorLayer in cocos2d xcode

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.

Upvotes: 0

Views: 1026

Answers (2)

Anks
Anks

Reputation: 225

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

Upvotes: 1

Fraser Graham
Fraser Graham

Reputation: 4820

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.

Upvotes: 1

Related Questions