Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var estouradas = 0;
- <span id="pontuacao">0</span>
- var temporizador; // para o setInterval
- var timer = 1000; // tempo inicial do setInterval, que será alterado dinamicamente
- if(estouradas%5 == 0){
- clearInterval(temporizador); // cancela o setInterval
- timer -= 100; // decrementa o tempo
- iniciar(timer); // inicia novamente com um novo tempo
- }
- function iniciar(t){
- temporizador = setInterval(addBola, t);
- }
- <body onload="iniciar(1000)">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement