44 lines
552 B
TypeScript
Raw Normal View History

2023-08-29 17:57:36 +08:00
import Client from "../Client/Client"
2023-08-28 17:24:17 +08:00
/**
* Room
*/
2023-08-29 17:57:36 +08:00
export default class Room {
//#region public
public SerialNumber: number = 0
//#endregion
2023-08-28 17:24:17 +08:00
//#region private
2023-08-29 17:57:36 +08:00
private wsArr: Client[] = []
2023-08-28 17:24:17 +08:00
//#endregion
//#region Lifecycle
/**
*
*/
2023-08-29 17:57:36 +08:00
constructor(serialNumber: number, ws: Client) {
this.SerialNumber = serialNumber
this.wsArr.push(ws)
2023-08-28 17:24:17 +08:00
}
//#endregion
//#region Custom
2023-08-31 19:28:35 +08:00
/** Join */
public Join(ws: Client): void {
this.wsArr.forEach(otherWS => {
// otherWS.SendClient()
})
this.wsArr.push(ws)
}
2023-08-28 17:24:17 +08:00
//#endregion
}