i am stupid
This commit is contained in:
parent
17720f0f1b
commit
208df7226c
2 changed files with 3 additions and 1 deletions
|
@ -38,6 +38,8 @@ Player.prototype.bump = function () {
|
||||||
player.dir *= -1;
|
player.dir *= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(player.ticks)
|
||||||
|
|
||||||
player.vel.x *= 0.3;
|
player.vel.x *= 0.3;
|
||||||
player.vel.y *= 0.3;
|
player.vel.y *= 0.3;
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Game extends GameBasic {
|
||||||
this.entities.push(this.player);
|
this.entities.push(this.player);
|
||||||
} else {
|
} else {
|
||||||
player.bump();
|
player.bump();
|
||||||
this.ws.send(JSON.stringify({ vel, dir, you }));
|
this.sync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sync() {
|
sync() {
|
||||||
|
|
Loading…
Reference in a new issue