add talk-icon

This commit is contained in:
Hanusiak Piotr
2022-02-01 12:25:14 +01:00
parent 4210334aa2
commit 520184fdeb
3 changed files with 13 additions and 0 deletions
+2
View File
@@ -245,6 +245,7 @@ export class GameScene extends DirtyScene {
loadCustomTexture(this.load, texture).catch((e) => console.error(e));
}
}
this.load.svg('iconTalk', '/resources/icons/icon_talking.svg');
if (touchScreenManager.supportTouchScreen) {
this.load.image(joystickBaseKey, joystickBaseImg);
@@ -630,6 +631,7 @@ export class GameScene extends DirtyScene {
let oldPeerNumber = 0;
this.peerStoreUnsubscribe = peerStore.subscribe((peers) => {
console.log(peers);
const newPeerNumber = peers.size;
if (newPeerNumber > oldPeerNumber) {
this.playSound("audio-webrtc-in");