TexturePacker的使用(图片打包再一起)


CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("last.plist","last.png"); CCTexture2D *texture=CCTextureCache::sharedTextureCache()->textureForKey("last.png"); CCSpriteBatchNode *node=CCSpriteBatchNode::createWithTexture(texture); addChild(node); CCSprite *s1=CCSprite::createWithSpriteFrameName("bird.png"); s1->setPosition(ccp(35,32.5)); node->addChild(s1); CCSprite *s2=CCSprite::createWithSpriteFrameName("cat.png"); s2->setPosition(ccp(100,100)); node->addChild(s2);

 

你可能感兴趣的:(text)