fix
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 09:44:04 +03:00
parent 480e9d41f8
commit cfa1afe4cb

View File

@@ -5,6 +5,7 @@ import { GameSocket } from "../net/Socket";
let localAddr: string = "ws://localhost:8080/ws"; let localAddr: string = "ws://localhost:8080/ws";
let remoteAddr: string = "wss://tma-api.quizer.space/ws"; let remoteAddr: string = "wss://tma-api.quizer.space/ws";
let isLocal: boolean = true;
type ServerPlayerState = { type ServerPlayerState = {
x: number; x: number;
@@ -19,7 +20,7 @@ export class GameScene extends Phaser.Scene {
create() { create() {
this.inputCtrl = new TouchInput(this); this.inputCtrl = new TouchInput(this);
this.socket = new GameSocket(localAddr); this.socket = new GameSocket(isLocal ? localAddr : remoteAddr);
this.socket.onState = (state) => { this.socket.onState = (state) => {
this.syncPlayers(state.players); this.syncPlayers(state.players);