mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-25 19:13:52 +00:00
WIP
This commit is contained in:
parent
acff5d8bc9
commit
d5061ff7a0
2 changed files with 2 additions and 2 deletions
BIN
static/img/boxarts/Mega Man.png
vendored
BIN
static/img/boxarts/Mega Man.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 144 KiB |
4
static/js/ws.js
vendored
4
static/js/ws.js
vendored
|
|
@ -62,7 +62,7 @@ conn.onmessage = e => {
|
|||
//conn.send(JSON.stringify({"id": "remotestart", "data": GAME_LIST[gameIdx].nes, "room_id": roomID.value, "player_index": parseInt(playerIndex.value, 10)}));inputTimer
|
||||
//break;
|
||||
case "heartbeat":
|
||||
console.log("Ping: ", Date.now() - d["data"])
|
||||
// console.log("Ping: ", Date.now() - d["data"])
|
||||
// TODO: Calc time
|
||||
break;
|
||||
case "start":
|
||||
|
|
@ -207,7 +207,7 @@ function startGame() {
|
|||
screenState = "game";
|
||||
|
||||
// conn.send(JSON.stringify({"id": "start", "data": gameList[gameIdx].file, "room_id": $("#room-txt").val(), "player_index": parseInt(playerIndex.value, 10)}));
|
||||
conn.send(JSON.stringify({"id": "start", "data": gameList[gameIdx].file, "room_id": $("#room-txt").val(), "player_index": 0}));
|
||||
conn.send(JSON.stringify({"id": "start", "data": gameList[gameIdx].file, "room_id": $("#room-txt").val(), "player_index": 1}));
|
||||
|
||||
// clear menu screen
|
||||
stopInputTimer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue