//直接添加
Sprite* sprite = Sprite::create("angry_birds_01.png");
sprite->setPosition(ccp(winSize.width / 2, winSize.height / 2));
//设置锚点,默认图片中心
//sp->setAnchorPoint(ccp(0, 0));
this->addChild(sprite);
//截取图片的矩形区域
Sprite* sprite = Sprite::create("angry_birds_01.png", Rect(0, 0, 100, 100));
sprite->setPosition(ccp(winSize.width / 2, winSize.height / 2));
this->addChild(sprite);
//全局缓存
SpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("plist/birds.plist");
Sprite* sprite = Sprite::createWithSpriteFrameName("angry_birds_02.png");
sprite->setPosition(ccp(winSize.width / 2, winSize.height / 2));
this->addChild(sprite);
SpriteFrame* spriteFrame = SpriteFrame::create("angry_birds_01.png", Rect(0, 0, 100, 100));
Sprite* sprite = Sprite::createWithSpriteFrame(spriteFrame);
sprite->setPosition(ccp(winSize.width / 2, winSize.height / 2));
this->addChild(sprite);
//批处理 适合大量重复的图片(子弹)
SpriteBatchNode* spriteBatchNode= SpriteBatchNode::create("angry_birds_01.png");
Sprite* sprite=Sprite::createWithTexture(spriteBatchNode->getTexture());
sprite->setPosition(ccp(winSize.width / 2, winSize.height / 2));
spriteBatchNode->addChild(sprite);
this->addChild(spriteBatchNode);