Allow player socket to be null
This commit is contained in:
parent
a982ccd704
commit
00d2262663
1 changed files with 2 additions and 2 deletions
|
|
@ -4,10 +4,10 @@ export class Player {
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
public team: team|null = null;
|
public team: team|null = null;
|
||||||
public role: role|null = null;
|
public role: role|null = null;
|
||||||
public socket: Socket;
|
public socket: Socket|null;
|
||||||
readonly isHost: boolean;
|
readonly isHost: boolean;
|
||||||
|
|
||||||
constructor(name: string, socket: Socket, isHost=false) {
|
constructor(name: string, socket: Socket|null=null, isHost=false) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.socket = socket;
|
this.socket = socket;
|
||||||
this.isHost = isHost;
|
this.isHost = isHost;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue