Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marchbold/4191aed63b81e2122d53 to your computer and use it in GitHub Desktop.
Save marchbold/4191aed63b81e2122d53 to your computer and use it in GitHub Desktop.
This example demonstrates initialising the extension and then initialising the game platform.
if (GameServices.isSupported)
{
GameServices.init( Config.distriqtApplicationKey );
trace( "GameServices Supported: " + GameServices.isSupported );
trace( "GameServices Version: " + GameServices.service.version );
GameServices.service.addEventListener( GameServicesEvent.INITIALISED, initialisedHandler );
if (GameServices.service.isServiceSupported( Service.GOOGLE_PLAY_GAME_SERVICES ))
{
var service:Service = new Service( Service.GOOGLE_PLAY_GAME_SERVICES, "googlePlayClientID" );
GameServices.service.initialiseService( service );
}
else
{
// Google Play is not supported
}
}
...
private function initialisedHandler( event:GameServicesEvent ):void
{
// The platform has been initialised
}
// com.distriqt.GameServices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment