auto animation = Animation::create(); animation->addSpriteFrameWithFile("NPC/hero.png"); animation->addSpriteFrameWithFile("NPC/hero1.png"); // should last 2.8 seconds. And there are 14 frames. animation->setDelayPerUnit(2.8f / 14.0f); animation->setRestoreOriginalFrame(true); auto action = Animate::create(animation); auto repeat=RepeatForever::create(action); auto creep=RepeatForever::create(action); runAction(creep);