Merge branch 'dev' of https://git.etud.insa-toulouse.fr/rebillar/GrandTabernacleAutoVI into dev
This commit is contained in:
commit
02f3c87804
1 changed files with 5 additions and 2 deletions
|
@ -37,6 +37,9 @@ class Network{
|
|||
case "newBullet":
|
||||
this.bulletsToAdd.push(new Bullet(data.data.x,data.data.y,data.data.dx,data.data.dy,data.data.id));
|
||||
break;
|
||||
case "died":
|
||||
console.log(data.data);
|
||||
console.log("someone died");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -52,8 +55,8 @@ class Network{
|
|||
})
|
||||
}
|
||||
|
||||
died(id){
|
||||
this.socket.send(JSON.stringify({type:"died",data:{id: id}}));
|
||||
died(id, killerId){
|
||||
this.socket.send(JSON.stringify({type:"died",data:{id: id, killerId: killerId}}));
|
||||
}
|
||||
|
||||
update(obj){ //send data to server in order to broadcast
|
||||
|
|
Loading…
Reference in a new issue