set to local addr
Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Failing after 31s
Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Failing after 31s
This commit is contained in:
@@ -3,6 +3,9 @@ import { RemotePlayer } from "../entities/RemotePlayer";
|
|||||||
import { TouchInput } from "../input/TouchInput";
|
import { TouchInput } from "../input/TouchInput";
|
||||||
import { GameSocket } from "../net/Socket";
|
import { GameSocket } from "../net/Socket";
|
||||||
|
|
||||||
|
let localAddr: string = "ws://localhost:8080/ws";
|
||||||
|
let remoteAddr: string = "wss://tma-api.quizer.space/ws";
|
||||||
|
|
||||||
type ServerPlayerState = {
|
type ServerPlayerState = {
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
@@ -16,7 +19,7 @@ export class GameScene extends Phaser.Scene {
|
|||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.inputCtrl = new TouchInput(this);
|
this.inputCtrl = new TouchInput(this);
|
||||||
this.socket = new GameSocket("wss://tma-api.quizer.space/ws");
|
this.socket = new GameSocket(localAddr);
|
||||||
|
|
||||||
this.socket.onState = (state) => {
|
this.socket.onState = (state) => {
|
||||||
this.syncPlayers(state.players);
|
this.syncPlayers(state.players);
|
||||||
|
|||||||
Reference in New Issue
Block a user