TalkIcon animation

This commit is contained in:
Hanusiak Piotr
2022-02-03 16:00:29 +01:00
parent a4cd626c41
commit d087bc02e9
3 changed files with 65 additions and 12 deletions
+2 -5
View File
@@ -647,9 +647,7 @@ export class GameScene extends DirtyScene {
for (const [key, videoStream] of peers) {
this.volumeStoreUnsubscribers.set(key, videoStream.volumeStore.subscribe((volume) => {
if (volume) {
console.log(`${key}: ${volume}`);
this.MapPlayersByKey.get(key)?.showIconTalk(volume > 5);
this.markDirty(); // should be dirty from animation
this.MapPlayersByKey.get(key)?.showTalkIcon(volume > 5);
}
}));
}
@@ -663,8 +661,7 @@ export class GameScene extends DirtyScene {
if (newPeerNumber > 0) {
this.localVolumeStoreUnsubscriber = localVolumeStore.subscribe((volume) => {
if (volume) {
this.CurrentPlayer.showIconTalk(volume > 5);
this.markDirty(); // should be dirty from animation
this.CurrentPlayer.showTalkIcon(volume > 5);
}
});
} else {