Adding a playersStore
The playerStore can be useful to get the details of a given player from its ID.
This commit is contained in:
parent
194d6a6414
commit
46e6917df6
8 changed files with 62 additions and 24 deletions
|
@ -91,6 +91,7 @@ import { soundManager } from "./SoundManager";
|
|||
import { peerStore, screenSharingPeerStore } from "../../Stores/PeerStore";
|
||||
import { videoFocusStore } from "../../Stores/VideoFocusStore";
|
||||
import { biggestAvailableAreaStore } from "../../Stores/BiggestAvailableAreaStore";
|
||||
import {playersStore} from "../../Stores/PlayersStore";
|
||||
|
||||
export interface GameSceneInitInterface {
|
||||
initPosition: PointInterface | null;
|
||||
|
@ -597,6 +598,8 @@ export class GameScene extends DirtyScene {
|
|||
.then((onConnect: OnConnectInterface) => {
|
||||
this.connection = onConnect.connection;
|
||||
|
||||
playersStore.connectToRoomConnection(this.connection);
|
||||
|
||||
this.connection.onUserJoins((message: MessageUserJoined) => {
|
||||
const userMessage: AddPlayerInterface = {
|
||||
userId: message.userId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue