Android plugin to implement Google Play Service into your game
Godot game engine:
git clone https://github.com/godotengine/godot
Login / Logout
Player Info
Achievements
Leaderboard
In-app Update
- Install Android build Template to your
GAME-PROJECT
func _ready():
if Engine.has_singleton("GDPlayService"):
google = Engine.get_singleton("GDPlayService")
google.initialize()
fun isConnected(): Boolean
fun signIn()
fun signOut()
fun getPlayerInfo(): Dictionary
fun increaseAchievement(name: String, value: Int)
fun unlockAchievement(name: String)
fun showAchievements()
fun loadTopScore(name: String, max: Int)
fun loadCurrentPlayerScore(name: String)
fun submitScore(name: String, value: Int)
fun showLeaderboard(name: String)
fun showAllLeaderboards()
fun canRecord(): Boolean
fun record()
Implements In-App Update
func _ready():
if Engine.has_singleton("GDPlayCoreLibrary"):
playCore = Engine.get_singleton("GDPlayCoreLibrary")
playCore.startAppUpdatedManager({
immediate = false,
flexible_days = 3
})
playCore.connect("update_available", self, "_update_available")
func _update_available(data: Dictionary):
if data.mode == "IMMEDIATE":
playCore.startUpdateImmediate(false)
else:
playCore.startUpdateFlexible(false)
fun isUpdateAvailable(): Boolean
fun startAppUpdatedManager(params: Dictionary)
fun startUpdateImmediate(allow_remove_asset: Boolean)
fun startUpdateFlexible(allow_remove_asset: Boolean)