fix
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m29s
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m29s
This commit is contained in:
@@ -5,6 +5,7 @@ import { GameSocket } from "../net/Socket";
|
||||
|
||||
let localAddr: string = "ws://localhost:8080/ws";
|
||||
let remoteAddr: string = "wss://tma-api.quizer.space/ws";
|
||||
let isLocal: boolean = true;
|
||||
|
||||
type ServerPlayerState = {
|
||||
x: number;
|
||||
@@ -19,7 +20,7 @@ export class GameScene extends Phaser.Scene {
|
||||
|
||||
create() {
|
||||
this.inputCtrl = new TouchInput(this);
|
||||
this.socket = new GameSocket(localAddr);
|
||||
this.socket = new GameSocket(isLocal ? localAddr : remoteAddr);
|
||||
|
||||
this.socket.onState = (state) => {
|
||||
this.syncPlayers(state.players);
|
||||
|
||||
Reference in New Issue
Block a user