feat: update du donjon, moins de balles
This commit is contained in:
parent
36f342a47d
commit
f59a23476b
1 changed files with 10 additions and 3 deletions
|
@ -174,7 +174,7 @@ function updateBullets(dt)
|
|||
}
|
||||
}
|
||||
|
||||
let lastbulletdonjon=[0]
|
||||
let lastbulletdonjon=[0,0]
|
||||
function Donjon() {
|
||||
if(player.z==10) {
|
||||
if(lastbulletdonjon[0]==59 && Math.floor(Date.now()/1000)%60 !=59) { lastbulletdonjon[0]=0 }
|
||||
|
@ -185,9 +185,16 @@ function Donjon() {
|
|||
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(615,178,10,0,2,-2));
|
||||
bullets.push(new Bullet(615,385,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));
|
||||
if(lastbulletdonjon[1]==5) {
|
||||
lastbulletdonjon[1]=0
|
||||
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));
|
||||
} else {
|
||||
lastbulletdonjon[1]++
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue