| Package | com.myflashlab.air.extensions.gameCenter |
| Class | public class GameCenter |
| Inheritance | GameCenter Object |
| Property | Defined By | ||
|---|---|---|---|
| cache : Cache [static] [read-only] | GameCenter | ||
| localPlayer : LocalPlayer [static] [read-only] | GameCenter | ||
| Method | Defined By | ||
|---|---|---|---|
init():void [static]
This will initialize the GameCenter ANE in your project. | GameCenter | ||
loadAchievementDescriptions($callback:Function):void [static] | GameCenter | ||
openNativeWindow($leaderboardId:String, $viewState:int, $timeScope:int, $callback:Function = null):void [static]
Opens a native window over your AIR app showing different views about GameCenter
| GameCenter | ||
showBanner($title:String, $msg:String, $duration:int = 1, $callback:Function = null):void [static]
A notification banner that displays text to the player. | GameCenter | ||
| Constant | Defined By | ||
|---|---|---|---|
| EXTENSION_ID : String = com.myflashlab.air.extensions.gameCenter [static] | GameCenter | ||
| VERSION : String = 0.0.11 [static] | GameCenter | ||
| cache | property |
| localPlayer | property |
localPlayer:LocalPlayer [read-only] public static function get localPlayer():LocalPlayer| init | () | method |
public static function init():voidThis will initialize the GameCenter ANE in your project. This must be called once and before any other methods.
| loadAchievementDescriptions | () | method |
public static function loadAchievementDescriptions($callback:Function):voidParameters
$callback:Function |
| openNativeWindow | () | method |
public static function openNativeWindow($leaderboardId:String, $viewState:int, $timeScope:int, $callback:Function = null):voidOpens a native window over your AIR app showing different views about GameCenter
Parameters
$leaderboardId:String | |
$viewState:int (default = NaN) | |
$timeScope:int (default = NaN) | |
$callback:Function (default = null) — function():void will be called when the native window is dismissed.
|
| showBanner | () | method |
public static function showBanner($title:String, $msg:String, $duration:int = 1, $callback:Function = null):voidA notification banner that displays text to the player.
Parameters
$title:String | |
$msg:String | |
$duration:int (default = 1) — default value is 1 second
| |
$callback:Function (default = null) — function($title:String, $message:String):void will be called when the
banner is dismissed.
|
| EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.gameCenter| VERSION | Constant |
public static const VERSION:String = 0.0.11