forked from oneseedfruit/PGSGP
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
godot 3.3 -- add ability to get player hiscore and rank
- Loading branch information
Showing
6 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
app/src/main/java/io/cgisca/godot/gpgs/leaderboards/LeaderBoardsListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package io.cgisca.godot.gpgs.leaderboards | ||
|
||
interface LeaderBoardsListener { | ||
fun onCurrentPlayerLeaderBoardScoreLoadingFailed() | ||
fun onCurrentPlayerLeaderBoardScoreLoaded(scoreJson: String) | ||
fun onLeaderBoardScoreSubmitted(leaderboardId: String) | ||
fun onLeaderBoardScoreSubmittingFailed(leaderboardId: String) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
app/src/main/java/io/cgisca/godot/gpgs/model/LeaderboardScore.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.cgisca.godot.gpgs.model | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class LeaderboardScore( | ||
@SerializedName("rank") var rank: Long, | ||
@SerializedName("score") var score: Long, | ||
@SerializedName("scoreHolder") var scoreHolder: String, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configurations.maybeCreate("default") | ||
artifacts.add("default", file('godot-lib.3.3.stable.release.aar')) | ||
artifacts.add("default", file('godot-li.3.2.stable.release.aar')) |