donjon
This commit is contained in:
parent
4230231962
commit
3c47694f3d
1 changed files with 9 additions and 13 deletions
|
@ -173,21 +173,17 @@ function updateBullets(dt)
|
||||||
let lastbulletdonjon=[0]
|
let lastbulletdonjon=[0]
|
||||||
function Donjon() {
|
function Donjon() {
|
||||||
if(player.z==10) {
|
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]) {
|
if(Math.floor(Date.now()/1000)%60 > lastbulletdonjon[0]) {
|
||||||
lastbulletdonjon[0]=Math.floor(Date.now()/1000)%60
|
lastbulletdonjon[0]=Math.floor(Date.now()/1000)%60
|
||||||
bullets.push(new Bullet(235,65,10,0,2,-2));
|
for(let i=0;i<5;i++){
|
||||||
bullets.push(new Bullet(235,491,10,0,-2,-2));
|
bullets.push(new Bullet(235,65,10,0,2,-2));
|
||||||
bullets.push(new Bullet(395,65,10,0,2,-2));
|
bullets.push(new Bullet(235,491,10,0,-2,-2));
|
||||||
bullets.push(new Bullet(395,491,10,0,-2,-2));
|
bullets.push(new Bullet(395,65,10,0,2,-2));
|
||||||
bullets.push(new Bullet(104,209,10,2,0,-2));
|
bullets.push(new Bullet(395,491,10,0,-2,-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));
|
|
||||||
}
|
}
|
||||||
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue