CCSprite* sprite = CCSprite::spriteWithSpriteFrame(sprite_frame);
sprite~~>getContentSize~~ returns CCSize(0,0), why?
Sprite initialized with spriteframe also doesn’t use anchor point?? O_O Ugly…
Correct me if i wrong, i’ve changed CCSprite::spriteWithFile to CCSprite::spritWithSpritFrameName and expect that my game doesn’t change look? But described inconsistense break all…
What’s your code look like?
I just took a test in the source:tests/tests/SpriteTest/SpriteTest.cpp, I add a line like this:
SpriteAnimationSplit::SpriteAnimationSplit()
{
......
//
// Animation using Sprite BatchNode
//
CCSprite* sprite = CCSprite::spriteWithSpriteFrame(frame0);
CCSize siz = sprite->getContentSize(); // This is the line added
......
}
And I place a breakpoint behind the line. The value of “siz” is *{132,132}*.
I have a screenshot attached:
Founded error in generated plist, sorry. May be copy originalWidth&originalHeight from width&height if it not presented in file?