import { DefaultInputReader } from "../defaultinput"; import { NetplayPlayer } from "../types"; import { GameClass } from "../game"; import { PeerConnection } from "../matchmaking/peerconnection"; import * as lit from "lit-html"; export declare abstract class GameWrapper { gameClass: GameClass; /** The canvas that the game will be rendered onto. */ canvas: HTMLCanvasElement; /** The network stats UI. */ stats: HTMLDivElement; inputReader: DefaultInputReader; isChannelOrdered(channel: RTCDataChannel): boolean; isChannelReliable(channel: RTCDataChannel): boolean; checkChannel(channel: RTCDataChannel): void; playerPausedIndicator: HTMLDivElement; constructor(gameClass: GameClass); /** * Calculate a scaling for our canvas so that it fits the whole screen. * Center the canvas with an offset. */ calculateLayout(container: { width: number; height: number; }, canvas: { width: number; height: number; }): { width: number; height: number; left: number; top: number; }; /** * Recalculate canvas scaling / offset. */ resize(): void; start(): Promise; startVisibilityWatcher(conn: PeerConnection): void; renderRTCStats(stats: RTCStatsReport): lit.TemplateResult; rtcStats?: lit.TemplateResult; watchRTCStats(connection: RTCPeerConnection): Promise; abstract startHost(players: Array, conn: PeerConnection): any; abstract startClient(players: Array, conn: PeerConnection): any; }