bulletIO
This commit is contained in:
parent
cfbfee45fb
commit
bd84fd7247
2 changed files with 3 additions and 4 deletions
|
@ -105,7 +105,7 @@ class Player
|
||||||
|
|
||||||
function dist(A,B)
|
function dist(A,B)
|
||||||
{
|
{
|
||||||
return sqrt((A.x-B.x)**2+(A.y-B.y)**2);
|
return Math.sqrt((A.x-B.x)**2+(A.y-B.y)**2);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Bullet
|
class Bullet
|
||||||
|
|
|
@ -89,9 +89,8 @@ function addBullets()
|
||||||
if (bulletsToAdd.length==0)
|
if (bulletsToAdd.length==0)
|
||||||
return;
|
return;
|
||||||
bulletsToAdd.forEach((b) => {
|
bulletsToAdd.forEach((b) => {
|
||||||
console.log("new bullet");
|
bullets.push(b);
|
||||||
bullets.push(p);
|
Renderer.addBullet(b);
|
||||||
Renderer.addBullet(p);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue