let player = null; let players = []; let renderer = new Render("canvas"); let LB = new LeaderBoard("canvas"); let bulletSound = new Sound("./assets/sounds/shoot.mp3"); let driftSound = new Sound("./assets/sounds/drift.mp3"); let net = new Network("wss://ws.gta6.insat.fr:8080?name=" + getCookie("pseudo")); let inp = new Input("canvas"); let bullets = []; let circles = []; let squares = []; function updatePlayer(data) { if(data.id==player.id) { player.x=data.x; player.y=data.y; } else { for(let i=0;i { if(p.id==idKilled) p.death++; if(p.id==idKiller) p.kill++; }); }