fix: game: 2d work

This commit is contained in:
2024-04-10 15:40:54 +00:00
parent 8b9c4d7c1c
commit 0b7e72d8e2
10 changed files with 41 additions and 39 deletions

View File

@ -18,7 +18,7 @@ export class PongPlayer extends APlayer
* @param {String} avatar
* @param {Client} client
*/
constructor(client, game, id, username, avatar, score = [], rail = new Segment(game), position = new Position(), isConnected)
constructor(client, game, id, username, avatar, score = [], rail = new Segment(game), position = new Position(0.5), isConnected)
{
super(client, game, id, username, avatar, isConnected)
@ -47,7 +47,7 @@ export class PongPlayer extends APlayer
*
* @param {Number} new_position
*/
updatePos(new_position, time)
updatePos(new_position)
{
this.position = new_position;
}