bullet Paquet Name
This commit is contained in:
parent
aa4348c407
commit
dd3ec0316c
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ class Network{
|
||||||
this.playersToRemove.push(data.data.id);
|
this.playersToRemove.push(data.data.id);
|
||||||
break;
|
break;
|
||||||
case "newBullet":
|
case "newBullet":
|
||||||
this.bulletsToAdd.push(new Bullet(data.x,data.y,data.dx,data.dy));
|
this.bulletsToAdd.push(new Bullet(data.data.x,data.data.y,data.data.dx,data.data.dy));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -61,7 +61,7 @@ class Network{
|
||||||
|
|
||||||
newBullet(x_,y_,dx_,dy_)
|
newBullet(x_,y_,dx_,dy_)
|
||||||
{
|
{
|
||||||
this.socket.send(JSON.stringify({type:"newBullet",x: x_,y: y_,dx: dx_,dy: dy_}));
|
this.socket.send(JSON.stringify({type:"newBullet",data:{x: x_,y: y_,dx: dx_,dy: dy_}}));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPlayersToAdd(){ //returns the list of new players
|
getPlayersToAdd(){ //returns the list of new players
|
||||||
|
|
Loading…
Reference in a new issue