fix bug: #21906 Pause/Resume 's result not correct.

This commit is contained in:
Vincent Yang 2015-08-10 17:58:49 +08:00
parent cb751e3c1a
commit d0a5c02399
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ void Timer::update(float dt)
{
trigger();
_elapsed = 0;
_elapsed -= _interval;
}
}
else

View File

@ -80,7 +80,6 @@ std::string SchedulerAutoremove::subtitle() const
void SchedulerPauseResume::onEnter()
{
SchedulerTestLayer::onEnter();
schedule(CC_SCHEDULE_SELECTOR(SchedulerPauseResume::tick1), 0.5f);
schedule(CC_SCHEDULE_SELECTOR(SchedulerPauseResume::tick2), 0.5f);
schedule(CC_SCHEDULE_SELECTOR(SchedulerPauseResume::pause), 3.0f);
@ -98,6 +97,7 @@ void SchedulerPauseResume::tick2(float dt)
void SchedulerPauseResume::pause(float dt)
{
CCLOG("pause, tick1 and tick2 should called six times");
Director::getInstance()->getScheduler()->pauseTarget(this);
}