g
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { CloudRegionCode } from "../../util/photon.ts";
|
||||
import type Profile from "../profiles/profile.ts";
|
||||
import { RoomLocation } from "./base.ts";
|
||||
import { RoomInstance, RoomLocation } from "./base.ts";
|
||||
|
||||
export class Instance {
|
||||
|
||||
@@ -8,7 +9,18 @@ export class Instance {
|
||||
#players: Set<Profile> = new Set();
|
||||
|
||||
#instanceId: number;
|
||||
//#roomId: number;
|
||||
//#subRoomId: number;
|
||||
#location: RoomLocation;
|
||||
//#name: string;
|
||||
//#maxCapacity: number;
|
||||
#isFull: boolean = false;
|
||||
//#isPrivate: boolean;
|
||||
#isInProgress: boolean = false;
|
||||
#photonRegionId: string = CloudRegionCode.us;
|
||||
//#photonRoomId: string;
|
||||
#dataBlob?: string;
|
||||
#eventId?: string
|
||||
|
||||
constructor(options: {
|
||||
id: number,
|
||||
@@ -30,10 +42,18 @@ export class Instance {
|
||||
}
|
||||
addPlayer(profile: Profile) {
|
||||
this.#players.add(profile);
|
||||
|
||||
}
|
||||
|
||||
getCreatedAt() {
|
||||
return this.#createdAt;
|
||||
}
|
||||
|
||||
export() {
|
||||
/*const inst: RoomInstance = {
|
||||
roomInstanceId: this.#instanceId,
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export interface RoomInstance {
|
||||
photonRegionId: string,
|
||||
photonRoomId: string,
|
||||
dataBlob?: string,
|
||||
eventId?: string
|
||||
eventId?: number
|
||||
}
|
||||
|
||||
export class InstanceManager extends ServerContentBase {
|
||||
|
||||
Reference in New Issue
Block a user