-
Notifications
You must be signed in to change notification settings - Fork 1
LocalPlayer
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
- GameCenter_LocalPlayer_Authenticate
- GameCenter_LocalPlayer_IsAuthenticated
- GameCenter_LocalPlayer_IsUnderage
- GameCenter_LocalPlayer_GetInfo
- GameCenter_LocalPlayer_IsMultiplayerGamingRestricted
- GameCenter_LocalPlayer_IsPersonalizedCommunicationRestricted
This function requests the API for user authentication with GameCenter credentials. When using the Apple GameCenter extension you need to call this function before using any other functions. The function will not return any value but it will create a request that will trigger an Social Async Event callback upon completion.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.
Syntax:
GameCenter_LocalPlayer_Authenticate()
Returns:
N/A
Triggers:
Key | Type | Description |
---|---|---|
type | String | "GameCenter_Authenticate" |
success | Boolean | Whether or not the task succeeded. |
Example:
GameCenter_LocalPlayer_Authenticate();
This function checks if the currently logged in user is authenticated or not.
Syntax:
GameCenter_LocalPlayer_IsAuthenticated()
Returns:
Example:
var _auth = GameCenter_LocalPlayer_IsAuthenticated();
This function checks if the currently logged in user is underage or not.
Syntax:
GameCenter_LocalPlayer_IsUnderage()
Returns:
Example:
var _underage = GameCenter_LocalPlayer_IsUnderage();
This function queries the Apple GameCenter server for information on the current player. The function will return a JSON formatted string that can be parsed into a struct using json_parse.
Syntax:
GameCenter_LocalPlayer_GetInfo()
Returns:
Example:
var _json = GameCenter_LocalPlayer_GetInfo();
var _player_info = json_parse(_json);
This function returns whether multiplayer gaming is restricted or not.
Syntax:
GameCenter_LocalPlayer_IsMultiplayerGamingRestricted()
Returns:
Example:
var _multiplayer_restricted = GameCenter_LocalPlayer_IsMultiplayerGamingRestricted();
A value that indicates whether the player can use personalized communication on the device.
See: personalizedCommunicationRestricted
Syntax:
GameCenter_LocalPlayer_IsPersonalizedCommunicationRestricted()
Returns:
Example:
GameCenter_LocalPlayer_IsPersonalizedCommunicationRestricted();
GameMaker 2024