CCAnimation::getFrames() get value is wrong?

0n v2.0.1

CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
cache~~>addSpriteFramesWithFile;
CCArray animFrame = CCArray::create;
char str[100] = ;
for
{
sprintf;
CCSpriteFrame
frame = cache~~>spriteFrameByName(str);
animFrame~~>addObject;
}
CCAnimation* animation = new CCAnimation;
animation~~>initWithSpriteFrames(animFrame, 0.2f);

CCArray animFrames = animation~~>getFrames;
if > 0)
{
CCSpriteFrameframe = animFrames~~>objectAtIndex; //value is wrong?

CCSpriteFrame frame1 = animFrames~~>objectAtIndex;
CCSpriteFrame *frame2 = animFrames~~>objectAtIndex;
CCSpriteFrame
frame3 = (CCSpriteFrame *)animFrames->objectAtIndex(3);
}

I used cocos2d-2.0-rc2-x-2.0.1

se7en huang wrote:

0n v2.0.1
>
CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
cache~~>addSpriteFramesWithFile;
CCArray animFrame = CCArray::create;
>
char str[100] = ;
for
{
sprintf;
CCSpriteFrame
frame = cache~~>spriteFrameByName(str);
animFrame~~>addObject;
}
>
CCAnimation* animation = new CCAnimation;
animation~~>initWithSpriteFrames(animFrame, 0.2f);
>
CCArray animFrames = animation~~>getFrames;
if > 0)
{
CCSpriteFrameframe = animFrames~~>objectAtIndex; //value is wrong?

CCSpriteFrame frame1 = animFrames~~>objectAtIndex;
CCSpriteFrame *frame2 = animFrames~~>objectAtIndex;
CCSpriteFrame
frame3 = (CCSpriteFrame *)animFrames->objectAtIndex(3);
}
>
I used cocos2d-2.0-rc2-x-2.0.1

I also have this problem with cocos2d-2.0-x-2.0.3. The return pointer of getFrames is not the expect value.

Jianbao Huang wrote:

se7en huang wrote:
> 0n v2.0.1
>
> CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
> cache~~>addSpriteFramesWithFile;
> CCArray animFrame = CCArray::create;
>
> char str[100] = ;
> for
> {
> sprintf;
> CCSpriteFrame
frame = cache~~>spriteFrameByName(str);
> animFrame~~>addObject;
> }
>
> CCAnimation* animation = new CCAnimation;
> animation~~>initWithSpriteFrames(animFrame, 0.2f);
>
> CCArray animFrames = animation~~>getFrames;
> if > 0)
> {
> CCSpriteFrameframe = animFrames~~>objectAtIndex; //value is wrong?

> CCSpriteFrame frame1 = animFrames~~>objectAtIndex;
> CCSpriteFrame frame2 = animFrames->objectAtIndex;
> CCSpriteFrame
frame3 = animFrames~~>objectAtIndex;
> }
>
> I used cocos2d-2.0-rc2-x-2.0.1
>
I also have this problem with cocos2d-2.0-x-2.0.3. The return pointer of getFrames is not the expect value.
Because getFrames return pointer is CCAnimationFrame
.