Files
front/netcode/model/GameObject.ts
T
2024-05-29 16:46:58 +02:00

12 lines
413 B
TypeScript

import type { IGameObject } from "../interfaces/generic";
export abstract class GameObject implements IGameObject {
static readonly instances = new Map<string, GameObject>()
readonly uuid: string;
readonly socket: WebSocket
constructor(socket: WebSocket, { uuid }: { uuid: string }) {
this.uuid = uuid
this.socket = socket
GameObject.instances.set(this.uuid, this)
}
}