17 lines
484 B
TypeScript
17 lines
484 B
TypeScript
|
import { physicsObject } from "../Classes/physicsObject";
|
||
|
import { playerData } from "../Classes/playerData";
|
||
|
|
||
|
export class lobbyState{
|
||
|
hostSocket : string
|
||
|
players : playerData[] = [];
|
||
|
objects : physicsObject[] = [];
|
||
|
|
||
|
copyLight(){
|
||
|
let lobby = Object.assign({}, this);
|
||
|
lobby.players = []
|
||
|
for (let i = 0; i < this.players.length; i++) {
|
||
|
lobby.players.push(playerData.copyLight(this.players[i]));
|
||
|
}
|
||
|
return lobby
|
||
|
}
|
||
|
}
|