File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,8 +122,26 @@ GoDice.prototype.onDiceConnected = (diceId, diceInstance) => {
122122 // die unique identifier
123123 let dieClass = diceInstance;
124124};
125- ` ` `
125+ ` ` `
126+
127+ ` ` ` javascript
128+ /**
129+ * To recognize when a die has disconneted, override the function "onDiceDisconnected" in the GoDice class, with the following parameter:
130+ * @param {string} diceID - the die unique identifier
131+ * @param {GoDice class} diceInstance - the die class instance
132+ */
133+
134+ // example:
126135
136+ GoDice .prototype .onDiceDisconnected = (diceId , diceInstance ) => {
137+ // die unique identifier
138+ let dieIdentifier = diceID;
139+
140+ // die unique identifier
141+ let dieClass = diceInstance;
142+ };
143+ ` ` `
144+
127145 ` ` ` javascript
128146 /**
129147 * To recognize the battery level, override the function "onBatteryLevel" in the GoDice class, with the following parameter:
You can’t perform that action at this time.
0 commit comments