armature:getAnimation()如何获取动画的长度

比如我想获得一个受击动画的时间长度,不知道用哪个接口?查了下没看到相关函数

源码不提供时长的接口也是醉了。。我估摸着版主也不一定知道要这么取。。
auto pArmature = Armature::create(“armatureName”);
auto pAnimation = pArmature->getAnimation();

pAnimation->play(“animationName”);
float duration = pAnimation->getAnimationData()->getMovement(pAnimation->getCurrentMovementID())->duration * 1 / 60.0f;

这种用法太奇葩了,我也醉了

— Begin quote from ____

引用第1楼liuxiaoyi135于2015-01-30 10:34发表的 :
源码不提供时长的接口也是醉了。。我估摸着版主也不一定知道要这么取。。
auto pArmature = Armature::create(“armatureName”);
auto pAnimation = pArmature->getAnimation();

pAnimation->play(“animationName”);
http://www.cocoachina.com/bbs/job.php?action=topost&tid=283114&pid=1233417

— End quote

没找到收藏,先马克下来