fix msg types
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m29s

This commit is contained in:
Smile Rex
2026-01-22 16:54:56 +03:00
parent bd072c8604
commit a54b315e5d

View File

@@ -30,12 +30,13 @@ export class GameSocket {
this.socket.onmessage = (e) => {
const msg = JSON.parse(e.data);
if (msg.type === "init") {
switch (msg.type) {
case "init":
this.playerId = msg.payload.id;
}
if (msg.type === "state") {
break;
case "input":
this.onState?.(msg.payload);
break;
}
};