Class Events
Events are triggered by TableRealms as part of its execution. Events can not be triggered. Only subscribed to.
Hierarchy
Index
Methods
- SubscribeToEvent
- SubscribeTo_ClientDisconnected
- SubscribeTo_ClientReceivedId
- SubscribeTo_Command
- SubscribeTo_Design
- SubscribeTo_DiscoveredNewClients
- SubscribeTo_Heartbeat
- SubscribeTo_ModelUpdate
- SubscribeTo_NewPlayer
- SubscribeTo_P2P
- SubscribeTo_QrCodeGenerated
- SubscribeTo_SessionInitiated
Methods
Static Private SubscribeToEvent
SubscribeToEvent(event: any, callback: any): void
- Defined in TableRealms.ts:106
Parameters
Returns void
Static SubscribeTo_ClientDisconnected
SubscribeTo_ClientDisconnected(callback: function): void
- Defined in TableRealms.ts:136
- A client can quit the app or experience network difficulties which will cause the connection to be closed.
Parameters
- callback: function
- a void that is called whenever a client connection is closed.
- (data: ClientDisconnectData): void
Parameters
- data: ClientDisconnectData
- Returns void
- Returns void
Static SubscribeTo_ClientReceivedId
SubscribeTo_ClientReceivedId(callback: function): void
- Defined in TableRealms.ts:129
- TableRealms discovers new clients once a backend poll returns new client IDs.
Parameters
- callback: function
- a void that is called once TableRealms has discovered new clients.
- (): void
- Returns void
- Returns void
Static SubscribeTo_Command
SubscribeTo_Command(callback: function): void
- Defined in TableRealms.ts:178
- An event that occurs whenever a command message is received.
Parameters
- callback: function
- a void that is called whenever a command message is received.
- (): void
- Returns void
- Returns void
Static SubscribeTo_Design
SubscribeTo_Design(callback: function): void
- Defined in TableRealms.ts:164
- An event that occurs whenever an augFile message is received.
Parameters
- callback: function
- a void that is called whenever an augFile message is received.
- (): void
- Returns void
- Returns void
Static SubscribeTo_DiscoveredNewClients
SubscribeTo_DiscoveredNewClients(callback: function): void
- Defined in TableRealms.ts:122
- TableRealms discovers new clients once a backend poll returns new client IDs.
Parameters
- callback: function
- a void that is called once TableRealms has discovered new clients.
- (): void
- Returns void
- Returns void
Static SubscribeTo_Heartbeat
SubscribeTo_Heartbeat(callback: function): void
- Defined in TableRealms.ts:171
- The heartbeat is sent every second to check if the connection is alive.
Parameters
- callback: function
- a void that is called whenever a heartbeat message is sent.
- (): void
- Returns void
- Returns void
Static SubscribeTo_ModelUpdate
SubscribeTo_ModelUpdate(callback: function): void
- Defined in TableRealms.ts:157
- An event that occurs whenever the model data is changed.
Parameters
- callback: function
- a void that is called whenever the model data is changed.
- (): void
- Returns void
- Returns void
Static SubscribeTo_NewPlayer
SubscribeTo_NewPlayer(callback: function): void
- Defined in TableRealms.ts:150
- A client can join the game by scanning the QR code.
Parameters
- callback: function
- a void that is called whenever a client connection is opened.
- (player: Player): void
Parameters
- player: Player
- Returns void
- Returns void
Static SubscribeTo_P2P
SubscribeTo_P2P(callback: function): void
- Defined in TableRealms.ts:185
- An event that occurs whenever a P2P message is received.
Parameters
- callback: function
- a void that is called whenever a P2P message is received.
- (): void
- Returns void
- Returns void
Static SubscribeTo_QrCodeGenerated
SubscribeTo_QrCodeGenerated(callback: function): void
- Defined in TableRealms.ts:143
- A client can quit the app or experience network difficulties which will cause the connection to be closed.
Parameters
- callback: function
- a void that is called whenever a client connection is closed.
- (qr: any): void
Parameters
- qr: any
- Returns void
- Returns void
Static SubscribeTo_SessionInitiated
SubscribeTo_SessionInitiated(callback: function): void
- Defined in TableRealms.ts:115
- A TableRealms session is initiated when the library received a sessionID from the backend servive. This enables client devices to join the same game.
Parameters
- callback: function
- a void that is called once a TableRealms session has been initiated.
- (): void
- Returns void
- Returns void