在CCActionInterval.h里的Animate类里有如下方法:
getCurrentFrameIndex() ;
--------------------------------------------------------
class CC_DLL Animate : public ActionInterval
{
public:
/**
* Gets the index of sprite frame currently displayed.
* @return int the index of sprite frame currently displayed.
*/
int getCurrentFrameIndex() { return _currFrameIndex; }
//以下省略
}
--------------------------------------------------------
在游戏代码里通过sprite的getActionByTag()得到Animate,然后调用此方法即可。