同样的纹理,在SpriteBatchNode中的Sprite设置半透明就是灰灰的感觉,如图
是不是需要设置什么,请大家帮忙看看
代码如下
auto layer = LayerColor::create(Color4B(255, 255, 255, 255));
addChild(layer);
auto BatchNode = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 50);
addChild(BatchNode);
auto spr1 = Sprite::createWithTexture(BatchNode->getTexture(), Rect(0,0,85,121));
spr1->setPosition( Vec2( 200, 200) );
spr1->setOpacity(50);
addChild(spr1);
auto spr2 = Sprite::createWithTexture(BatchNode->getTexture(), Rect(0,0,85,121));
spr2->setPosition( Vec2( 300, 200) );
spr2->setOpacity(50);
BatchNode->addChild(spr2);
```
