Add basic multiplayer
This commit is contained in:
parent
0f0a1eaf67
commit
46a48e7c15
113 changed files with 1362 additions and 754 deletions
|
|
@ -1,13 +0,0 @@
|
|||
import { Player } from './player';
|
||||
|
||||
export class PlayerContainer {
|
||||
private socketIdToPlayer = new Map<string, Player>();
|
||||
|
||||
public addPlayer(player: Player) {
|
||||
this.socketIdToPlayer.set(player.socketId, player);
|
||||
}
|
||||
|
||||
public removePlayerBySocketId(socketId: string) {
|
||||
this.socketIdToPlayer.delete(socketId);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue