Example #1
0
/**
 * 停止定时器管理线程
 */
void timerManager::stop()
{
	if(m_isRunning)
	{
		deactive();
		m_isRunning = false;
	}
}
Example #2
0
void Player::act()
{
	while (isActive) {
		if (!retrieving) {
			// acting
			if (!lines.empty()) {
				if (iter != lines.end()) {
					play.recite(iter, sceneCount);
					iter++;
				}
				else {
					exit();
				}
			}
			// no job anymore
			if (lines.empty() && play.checkPlayFinished()) {
				deactive();
			}
		}
		// else is waiting
	}
}