Jobed Rony wrote:
this -> setDisplayFrame(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName("warant-walk1.png"));
But what if I have several files with the same name? For example, if they are in different directories? Moreover, I can change the name of a sprite.
Maybe should exists method like
sprite->getAnimation()->setFrame(0), where 0 is the index of initial frame? I can’t find something like that…