Exemplo n.º 1
0
/**
 * 停止定时器管理线程
 */
void timerManager::stop()
{
	if(m_isRunning)
	{
		deactive();
		m_isRunning = false;
	}
}
Exemplo n.º 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
	}
}