Compare commits

..

No commits in common. "02f3c87804288c0ceea613a5ae47f206e2b94f0f" and "dfd649ba65640e5ff5e533a4f9e8351ac2fbee8e" have entirely different histories.

3 changed files with 1 additions and 13 deletions

View file

@ -4,7 +4,7 @@ const playerSize = 50.;
const playerSpeed=.2;
const bulletSpeed=playerSpeed*2;
const halfSqrtTwo=0.70710678118;
const defaulthealth=10.;
const defaulthealth=10
class Player
{

View file

@ -108,7 +108,6 @@ function game() {
player=Net.clientPlayer;
players=Net.getPlayersToAdd();
Renderer.AddPlayer(player)
Renderer.SetPlayerId(player.id)
console.log("Connected as id ",playerId);
Inp.player=player;

View file

@ -11,11 +11,6 @@ class Render {
this.bullets = [];
this.mapsrc=mapsrc;
this.ReloadAff();
this.playerid=0;
}
SetPlayerId(id) {
this.playerid=id
}
AddPlayer(player) {
@ -54,12 +49,6 @@ class Render {
this.ctx.fillStyle = 'white';
this.ctx.font="10pt arial";
this.ctx.fillText(player.name,player.x-player.name.length*10/3,player.y-playerSize/1.8);
if(player.id==this.playerid) {
this.ctx.fillStyle = 'red';
this.ctx.fillRect(player.x-playerSize/2-5, player.y-playerSize/2, playerSize+10, 5);
this.ctx.fillStyle = '#7AFF33';
this.ctx.fillRect(player.x-playerSize/2-5, player.y-playerSize/2, player.health*(playerSize+10)/defaulthealth, 5);
}
}
RenderBullet(bullet) {