@ycdiv 写道:
看一下代码吧:
SpriteBatchNode* batch = SpriteBatchNode::create("puke.png", 44);
addChild(batch, 1);
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("puke.plist");auto sprite1 = Sprite::createWithSpriteFrameName("paimian_Z.png");
auto sprite1X = paimian->getContentSize().width;
auto sprite1Y = paimian->getContentSize().height;
auto spriteNumber = Sprite::createWithSpriteFrameName(*(pokerNumber+Number));
spriteNumber->setPosition(25,sprite1 -30);
sprite1>addChild(spriteNumber);
auto spriteNumber2 = Sprite::createWithSpriteFrameName(*(pokerNumber+Number));
spriteNumber2->setPosition(sprite1X - 25, 30);
spriteNumber2->setFlippedY(true);
spriteNumber2->setFlippedX(true);
sprite1->addChild(spriteNumber2);
addChild(sprite1);
请问怎么更改上面两个spriteNumber的帧!
我这做的是一张合图,希望各位大神看看我这么做对吗???
帖子: 2
参与者: 1