Platforms to show: All Mac Windows Linux Cross-Platform
GKLocalPlayerMBS class
Super class: GKPlayerMBS
class, GameKit,
MBS Real Studio MountainLion Plugin
(GameKit),
class GKLocalPlayerMBS,
Plugin version: 12.3, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.
Function: The GKLocalPlayer class is a special subclass of GKPlayer that represents the authenticated player running your game on the local device.
Notes:
At any given time, only one player may be authenticated on the device; this player must log out before another player can log in.
Your game must authenticate the local player before using any Game Center features. Authenticating the player ensures that the player has created an account and is connected to Game Center. To authenticate the local player, retrieve the shared instance of the local player by calling the localPlayer class method, and then call the authenticateWithCompletionHandler: method.
You can see whether the local player is authenticated by reading the local player's authenticated property. If authenticated is YES, then the local player's other properties are valid, and you can call other Game Center methods.
Call the loadFriendsWithCompletionHandler: method to retrieve the player identifiers for the local player's friends.
Subclass of the GKPlayerMBS class.
Plugin version: 12.3, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.
Function: The GKLocalPlayer class is a special subclass of GKPlayer that represents the authenticated player running your game on the local device.
Notes:
At any given time, only one player may be authenticated on the device; this player must log out before another player can log in.
Your game must authenticate the local player before using any Game Center features. Authenticating the player ensures that the player has created an account and is connected to Game Center. To authenticate the local player, retrieve the shared instance of the local player by calling the localPlayer class method, and then call the authenticateWithCompletionHandler: method.
You can see whether the local player is authenticated by reading the local player's authenticated property. If authenticated is YES, then the local player's other properties are valid, and you can call other Game Center methods.
Call the loadFriendsWithCompletionHandler: method to retrieve the player identifiers for the local player's friends.
Subclass of the GKPlayerMBS class.
- method authenticate(tag as variant = nil)
- method Constructor
- method friends as string()
- shared method GKPlayerAuthenticationDidChangeNotificationName as string
- method isAuthenticated as boolean
- method isUnderage as boolean
- method loadDefaultLeaderboardCategoryID(tag as variant = nil)
- method loadFriends(tag as variant = nil)
- shared method localPlayer as GKLocalPlayerMBS
- method SetAuthenticateHandler(tag as integer)
- method setDefaultLeaderboardCategoryID(categoryID as string, tag as variant = nil)
Super class GKPlayerMBS
- property Handle as Integer
- method alias as string
- shared method Available as boolean
- method Constructor
- shared method GKPlayerDidChangeNotificationName as string
- method isFriend as boolean
- method loadPhotoForSize(size as integer, tag as variant = nil)
- shared method loadPlayersForIdentifiers(identifiers() as string, tag as variant = nil)
- method playerID as string
- const GKPhotoSizeNormal = 1
- const GKPhotoSizeSmall = 0
This class has no sub classes.
Some events for this class:
- GameKitMBS.authenticateCompleted(localPlayer as GKLocalPlayerMBS, error as NSErrorMBS, tag as variant)
- GameKitMBS.authenticateHandler(LocalPlayer as GKLocalPlayerMBS, viewController as NSViewControllerMBS, error as NSErrorMBS, tag as integer)
- GameKitMBS.loadDefaultLeaderboardCategoryIDCompleted(LocalPlayer as GKLocalPlayerMBS, categoryID as string, error as NSErrorMBS, tag as variant)
- GameKitMBS.loadFriendsCompleted(localPlayer as GKLocalPlayerMBS, friends() as string, error as NSErrorMBS, tag as variant)
- GameKitMBS.setDefaultLeaderboardCategoryIDCompleted(LocalPlayer as GKLocalPlayerMBS, categoryID as string, error as NSErrorMBS, tag as variant)
Some examples which use this class:
The items on this page are in the following plugins: MBS Real Studio MountainLion Plugin.
Links
MBS Realbasic Plugins