diff --git a/public_html/js/global.js b/public_html/js/global.js index 9d9bec7..d0aaf37 100644 --- a/public_html/js/global.js +++ b/public_html/js/global.js @@ -173,21 +173,17 @@ function updateBullets(dt) let lastbulletdonjon=[0] function Donjon() { if(player.z==10) { - if(lastbulletdonjon[0]==59) { lastbulletdonjon[0]=0 } + if(lastbulletdonjon[0]==59 && Math.floor(Date.now()/1000)%60 !=59) { lastbulletdonjon[0]=0 } if(Math.floor(Date.now()/1000)%60 > lastbulletdonjon[0]) { lastbulletdonjon[0]=Math.floor(Date.now()/1000)%60 - bullets.push(new Bullet(235,65,10,0,2,-2)); - bullets.push(new Bullet(235,491,10,0,-2,-2)); - bullets.push(new Bullet(395,65,10,0,2,-2)); - bullets.push(new Bullet(395,491,10,0,-2,-2)); - bullets.push(new Bullet(104,209,10,2,0,-2)); - bullets.push(new Bullet(107,356,10,2,0,-2)); - bullets.push(new Bullet(235,65,10,0,2,-2)); - bullets.push(new Bullet(235,491,10,0,-2,-2)); - bullets.push(new Bullet(395,65,10,0,2,-2)); - bullets.push(new Bullet(395,491,10,0,-2,-2)); - bullets.push(new Bullet(104,209,10,2,0,-2)); - bullets.push(new Bullet(107,356,10,2,0,-2)); + for(let i=0;i<5;i++){ + bullets.push(new Bullet(235,65,10,0,2,-2)); + bullets.push(new Bullet(235,491,10,0,-2,-2)); + bullets.push(new Bullet(395,65,10,0,2,-2)); + bullets.push(new Bullet(395,491,10,0,-2,-2)); + } } + bullets.push(new Bullet(107,95+(Date.now()*0.1)%365,10,1,0,-2)); + bullets.push(new Bullet(107,460-(Date.now()*0.1)%365,10,1,0,-2)); } } \ No newline at end of file