File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -3338,7 +3338,26 @@ class cocos2d::CCRepeat : cocos2d::CCActionInterval {
33383338 / / CC_SAFE_DELETE (pNewZone);
33393339 return pCopy;
33403340 }
3341- virtual void update (float dt) = imac 0x3a3540 , m1 0x330274 ;
3341+ virtual void update (float dt) = imac 0x3a3540 , m1 0x330274 , ios inline {
3342+ if (dt >= m_fNextDt) {
3343+ while (dt > m_fNextDt && m_uTotal < m_uTimes) {
3344+ m_pInnerAction-> update (1.0 f);
3345+ m_uTotal++ ;
3346+ m_pInnerAction-> stop ();
3347+ m_pInnerAction-> startWithTarget (m_pTarget);
3348+ m_fNextDt += m_pInnerAction-> getDuration () / m_fDuration;
3349+ }
3350+ if (dt >= 1.0 f && m_uTotal < m_uTimes) m_uTotal++ ;
3351+ if (!m_bActionInstant) {
3352+ if (m_uTotal == m_uTimes) {
3353+ m_pInnerAction-> update (1 );
3354+ m_pInnerAction-> stop ();
3355+ }
3356+ else m_pInnerAction-> update (dt - (m_fNextDt - m_pInnerAction-> getDuration () / m_fDuration));
3357+ }
3358+ }
3359+ else m_pInnerAction-> update (fmodf (dt * m_uTimes, 1.0 f));
3360+ }
33423361 virtual bool isDone () = imac 0x3a3670 , m1 0x3303e4 , ios inline {
33433362 return m_uTotal == m_uTimes;
33443363 }
You can’t perform that action at this time.
0 commit comments