Is there any way I can pause the below set of delayed functions from another function? I want to pause everything for 10 seconds by executing another function.
What I need is something like:
function pause(){
pause sleepLoop() for 10 seconds
}
If it is not possible to pause the below execution, can I kill it?
function game() {
sleepLoop();
}
function sleepLoop() {
loop...
setTimeout('gameActions()',5000);
}
function gameActions() {
actions...
sleepLoop();
}