Skip to content

Commit

Permalink
Add leaderboard id to scoreLoaded signal
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Ibáñez Sánchez <jacobibanez@jacobibanez.com>
  • Loading branch information
Iakobs committed Dec 17, 2023
1 parent ec5b4f2 commit ce7d739
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class LeaderboardsProxy(
godot,
BuildConfig.GODOT_PLUGIN_NAME,
scoreLoaded,
leaderboardId,
Gson().toJson(score)
)
} else {
Expand All @@ -146,6 +147,7 @@ class LeaderboardsProxy(
godot,
BuildConfig.GODOT_PLUGIN_NAME,
scoreLoaded,
leaderboardId,
Gson().toJson(null)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ object LeaderboardSignals {
/**
* This signal is emitted when calling the [com.jacobibanez.plugin.android.godotplaygameservices.GodotAndroidPlugin.loadPlayerScore] method.
*
* @return A JSON with a [com.google.android.gms.games.leaderboard.LeaderboardScore](https://developers.google.com/android/reference/com/google/android/gms/games/leaderboard/LeaderboardScore).
* @return The leaderboard id and a JSON with a [com.google.android.gms.games.leaderboard.LeaderboardScore](https://developers.google.com/android/reference/com/google/android/gms/games/leaderboard/LeaderboardScore).
*/
val scoreLoaded = SignalInfo("scoreLoaded", String::class.java)
val scoreLoaded = SignalInfo("scoreLoaded", String::class.java, String::class.java)

/**
* This signal is emitted when calling the [com.jacobibanez.plugin.android.godotplaygameservices.GodotAndroidPlugin.loadAllLeaderboards] method.
Expand Down

0 comments on commit ce7d739

Please sign in to comment.