connect(pPauseAction_,SIGNAL(toggled(bool)),this,SLOT(pause(bool)));
+ autopauseTimer.setInterval(15*60*1000);
+ connect(&autopauseTimer,SIGNAL(timeout()),this,SLOT(forcePause()));
+
+
}
void SeaScene::setupMap(int ghosts, int rocks, int octopuses, int octopusSpeed)
connect(pOctopus,SIGNAL(droppingGhosts()),pShip,SLOT(dropAllGhosts()));
}
delete pPosition;
+
+
}
void SeaScene::setupMap(Level level)
screenLitKeeper_.keepScreenLit(true);
if (pPausetextItem_)
pPausetextItem_->hide();
+
+ autopauseTimer.start(); //Start counting towards autopause
}
else
qDebug() << "showing pause text";
}
else qDebug() << "No pause text available";
+
+ autopauseTimer.stop(); //No need to count toward autopause when already paused
}
}
setupMap(levelList_.value(currentLevel_)); //value() returns default constructor Level if index is invalid, so no risk of crash
vibrationActivate(pVibrateAction_->isChecked()); //Vibration effects are lost without this
// qDebug() << pVibrateAction_->isChecked();
+ autopauseTimer.start(); //reset counting towards autopause
}