Skip to content

Commit

Permalink
Fixed insertCoin Callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
momintlh committed Jan 22, 2024
1 parent 283accd commit e33c0b0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Assets/Plugins/PlayroomPlugin.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ mergeInto(LibraryManager.library, {
});
}

function OnLaunchCallBack() {
dynCall("v", onLaunchCallBack, []);
}

function OnDisconnectCallback() {
dynCall("v", onDisconnectCallback, []);
}



var options = optionsJson ? JSON.parse(UTF8ToString(optionsJson)) : {};

Promise.all([
Expand All @@ -40,9 +50,9 @@ mergeInto(LibraryManager.library, {
return;
}

Playroom.insertCoin(options)
Playroom.insertCoin(options, OnLaunchCallBack, OnDisconnectCallback)
.then(() => {
dynCall("v", onLaunchCallBack, []);


Playroom.onPlayerJoin((player) => {
var id = player.id;
Expand Down

0 comments on commit e33c0b0

Please sign in to comment.