Package | net.flashplusplus.Snapdragon.GameCenter |
Class | public class SDGameCenterManager |
Inheritance | SDGameCenterManager flash.events.EventDispatcher |
Method | Defined By | ||
---|---|---|---|
SDGameCenterManager(namespace:Namespace)
Constructor of SDGameCenter singleton class. | SDGameCenterManager | ||
achievementRequest():void
Get the achievement progress of the local player from the iOS Game Center. | SDGameCenterManager | ||
gameCenterAuthentication():void
Authenticates local player. | SDGameCenterManager | ||
getInstance(nameSpace:Namespace):SDGameCenterManager [static]
Function to get SDGameCenterManager instance. | SDGameCenterManager | ||
Get local player object. | SDGameCenterManager | ||
isAuthenticated():Boolean
Checking if the local player is authenticated. | SDGameCenterManager | ||
isGameCenterAvailable():Boolean
Checking if the actual device running the application is capable of using the iOS Game Center. | SDGameCenterManager | ||
leaderboardListRequest():void
Get the existing leadeboards from the iOS Game Center. | SDGameCenterManager | ||
leaderboardScoreRequest(category:String, timeScope:String, playerScope:String, start:int, length:int):void
Get the scores of a specific leadeboard from the iOS Game Center. | SDGameCenterManager | ||
reportScoreForLeaderboard(category:String, score:int):void
Reporting score for a specific leaderboard. | SDGameCenterManager | ||
resetAchievements():void
Clears achievement progress data of the local player. | SDGameCenterManager | ||
showAchievements():void
Shows the native iOS Game Center view of achievements. | SDGameCenterManager | ||
showLeaderboard(category:String, timeScope:String):void
Shows the native iOS Game Center view of leaderboards. | SDGameCenterManager | ||
submitAchievement(identifier:String, progress:Number, showBanner:Boolean = true):void
Submits an achievement to iOS Game Center in the name of the local player. | SDGameCenterManager |
SDGameCenterManager | () | Constructor |
public function SDGameCenterManager(namespace:Namespace)
Constructor of SDGameCenter singleton class. It cannot be used directly, use getGameCenterManager property of Snapdragon instead.
Parametersnamespace:Namespace — is an internal namespace, so this method cannot be used.
|
error — when it is called.
|
achievementRequest | () | method |
public function achievementRequest():void
Get the achievement progress of the local player from the iOS Game Center.
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_PROGRESS_COMPLETE — When the request was successfully completed. The event contains the progress data in achievements vector.
| |
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_PROGRESS_ERROR — When there was an error by the requesting progress data.
|
gameCenterAuthentication | () | method |
public function gameCenterAuthentication():void
Authenticates local player. iOS Game Center features will not be accessable, while local user is not authenticated.
net.flashplusplus.Snapdragon.GameCenter.SDAuthenticationEvent.AUTHENTICATION_COMPLETE — When the authentication was successful.
| |
net.flashplusplus.Snapdragon.GameCenter.SDAuthenticationEvent.AUTHENTICATION_ERROR — When there was an error by the authentication process.
|
getInstance | () | method |
public static function getInstance(nameSpace:Namespace):SDGameCenterManager
Function to get SDGameCenterManager instance. It is not meant to be used.
Parameters
nameSpace:Namespace — is an internal namespace, so this method cannot be used.
|
SDGameCenterManager — the only instance of SDGameCenterManager object.
|
getLocalPlayer | () | method |
public function getLocalPlayer():SDPlayer
Get local player object.
ReturnsSDPlayer — the local player object if the user is authenticated, null otherwise.
|
isAuthenticated | () | method |
public function isAuthenticated():Boolean
Checking if the local player is authenticated.
ReturnsBoolean — true if the local player is authenticated.
|
isGameCenterAvailable | () | method |
public function isGameCenterAvailable():Boolean
Checking if the actual device running the application is capable of using the iOS Game Center.
ReturnsBoolean — true if Game Center features are applicable, else returns false.
|
leaderboardListRequest | () | method |
public function leaderboardListRequest():void
Get the existing leadeboards from the iOS Game Center.
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_LIST_COMPLETE — When the request was successfully completed. The event contains the list of leaderboards in the leaderboards vector.
| |
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_LIST_ERROR — When there was an error by the requesting leaderboard data.
|
leaderboardScoreRequest | () | method |
public function leaderboardScoreRequest(category:String, timeScope:String, playerScope:String, start:int, length:int):void
Since : | iOS 6.0 |
Get the scores of a specific leadeboard from the iOS Game Center.
Parameters
category:String — is the leaderboard id.
| |
timeScope:String — is the time scope of the leaderboard. Possible values can be accessed through the static constants of the SDLeaderboard class: TIME_SCOPE_ALL_TIME, TIME_SCOPE_TODAY, TIME_SCOPE_WEEK
| |
playerScope:String — is the player scope of the leaderboard. Possible values can be accessed through the static constants of the SDLeaderboard class: PLAYER_SCOPE_GLOBAL, PLAYER_SCOPE_FRIENDS
| |
start:int — is the start index.
| |
length:int — is the number of items in the range (can be 0).
|
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_SCORE_REQUEST_COMPLETE — When the request was successfully completed. The event contains the list of scores in the scores vector.
| |
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_SCORE_REQUEST_ERROR — When there was an error by the requesting score data.
|
reportScoreForLeaderboard | () | method |
public function reportScoreForLeaderboard(category:String, score:int):void
Reporting score for a specific leaderboard.
Parameters
category:String — is the leaderboard id.
| |
score:int — is the score being reported for the current user.
|
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_SCORE_REPORT_COMPLETE — When the report was successfully completed.
| |
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_SCORE_REPORT_ERROR — When there was an error by reporting the score.
|
resetAchievements | () | method |
public function resetAchievements():void
Clears achievement progress data of the local player.
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_RESET_COMPLETE — When the progressdata was successfully deleted.
| |
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_RESET_ERROR — When there was an error by deleting the data.
|
showAchievements | () | method |
public function showAchievements():void
Since : | iOS 6.0 |
Shows the native iOS Game Center view of achievements.
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_VIEW_CLOSED — When the animation of closing the view was finished.
|
showLeaderboard | () | method |
public function showLeaderboard(category:String, timeScope:String):void
Since : | iOS 6.0 |
Shows the native iOS Game Center view of leaderboards.
Parameters
category:String — is the leaderboard id.
| |
timeScope:String — is the time scope of the leaderboard. Possible values can be accessed through the static constants of the SDLeaderboard class: TIME_SCOPE_ALL_TIME, TIME_SCOPE_TODAY, TIME_SCOPE_WEEK
|
net.flashplusplus.Snapdragon.GameCenter.events.SDLeaderboardEvent.LEADERBOARD_VIEW_CLOSED — When the animation of closing the view was finished.
|
submitAchievement | () | method |
public function submitAchievement(identifier:String, progress:Number, showBanner:Boolean = true):void
Submits an achievement to iOS Game Center in the name of the local player.
Parameters
identifier:String — is the id of the achievement.
| |
progress:Number — is the completion of the achievement in percentage. Game center stores it as an integer.
| |
showBanner:Boolean (default = true ) — is for showing the banner of the achievement completion.
|
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_SUBMIT_COMPLETE — When the achievement was submitted to the Game Center successfully.
| |
net.flashplusplus.Snapdragon.GameCenter.events.SDAchievementEvent.ACHIEVEMENT_SUBMIT_ERROR — When there was an error by the submission process.
|