kolyosick at February 22nd, 2012 02:58 — #1
I am trying to add black backgound with opacity to my sprite (something like LIghtbox):
CCLayerColor *blackBg = CCLayerColor::layerWithColor(ccc4(0, 0, 0, 100));
And I get EXC_BAD_ACCESS when adding it to “this”. “this” is not NULL, and blackBg too.
CCAssertpChild)~~>getTexture()~~>getName == m_pobTextureAtlas~~>getTexture()~~>getName, “”);// Here is the line where I get EXC_BAD_ACCESS
unsigned int index = m_pobBatchNode~~>atlasIndexForChild((CCSprite*)(pChild), zOrder);
Can anyone explain what this line means?
k3vn at February 22nd, 2012 13:39 — #2
Since its going into the “if(m_bUsesBatchNode)” section, the sprite is setup to use a sprite batch node. If the sprite is using a sprite batch node, it must use the same texture as the parent node.
kolyosick at February 23rd, 2012 12:36 — #3
it must use the same texture as the parent node.
But I use CCLayerColor. There is no any textures