Documentation Search
Godot Apple Plugins Class

GKGameCenterViewController

Inherits: RefCounted < Object

Presents Game Center dashboards and player information.

Description

Call a static show_* method to present Game Center UI. Call dismiss() to close the UI shown by the last show_* call.

GKGameCenterViewController.show_type(GKGameCenterViewController.DASHBOARD)

Later, from your own event handler, call:

GKGameCenterViewController.dismiss()

Methods

void

dismiss() static

void

show_achievement(id: String) static

void

show_leaderboard(leaderboard: GKLeaderboard, scope: int) static

void

show_leaderboard_time_period(id: String, scope: int, timeScope: int) static

void

show_leaderboardset(id: String) static

void

show_player(player: GKPlayer) static

void

show_type(type: State) static


Enumerations

enum State: 🔗

State DEFAULT_SCREEN = 0

The default screen.

State LEADERBOARDS = 1

The leaderboard sets or leaderboards if there are no sets.

State ACHIEVEMENTS = 2

The list of achievement.

State LOCAL_PLAYER_PROFILE = 3

The local player

State DASHBOARD = 4

The dashboard.

State LOCAL_PLAYER_FRIENDS_LIST = 5

The friends list.


Method Descriptions

void dismiss() static 🔗

Closes the Game Center UI shown by the last show_* call. Has no effect if no Game Center UI is open.


void show_achievement(id: String) static 🔗

Presents an achievement to the user, the id is the identifier of the achievement.


void show_leaderboard(leaderboard: GKLeaderboard, scope: int) static 🔗

Shows a leaderboard with the players on the specified scope. Use one of the PlayerScope values.


void show_leaderboard_time_period(id: String, scope: int, timeScope: int) static 🔗

Shows a leaderboard with the players on the specified scope and the time period. The scope should match PlayerScope and the time scope should match TimeScope.


void show_leaderboardset(id: String) static 🔗

Shows a specific leaderboard set.


void show_player(player: GKPlayer) static 🔗

Shows the specified player’s GameCenter profile.


void show_type(type: State) static 🔗

Used to present one of the different Game Center dashboards specified by the type parameter.