Match abort if all players not ready in time (5s)
+ HTML Keys instructions
This commit is contained in:
@@ -3,7 +3,7 @@ import * as c from "./constants.js"
|
||||
import { gc, matchOptions } from "./global.js"
|
||||
import * as ev from "../shared_js/class/Event.js"
|
||||
import * as en from "../shared_js/enums.js"
|
||||
import { matchmaking, matchmakingComplete, startGame } from "./pong.js";
|
||||
import { matchmaking, matchmakingComplete, matchAbort, matchStart } from "./pong.js";
|
||||
import { RacketClient } from "./class/RectangleClient.js";
|
||||
import { repeatInput } from "./handleInput.js";
|
||||
import { soundRoblox } from "./audio.js"
|
||||
@@ -67,7 +67,11 @@ function preMatchListener(this: WebSocket, event: MessageEvent)
|
||||
case en.EventTypes.matchStart:
|
||||
socket.removeEventListener("message", preMatchListener);
|
||||
socket.addEventListener("message", inGameListener);
|
||||
startGame();
|
||||
matchStart();
|
||||
break;
|
||||
case en.EventTypes.matchAbort:
|
||||
socket.removeEventListener("message", preMatchListener);
|
||||
matchAbort();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user