Cocos Creator API

1.4.x

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

AgentManager

Module: anysdk

agent manager of plugin

Methods

init
(
  • appKey
  • appSecret
  • privateKey
  • oauthLoginServer
)

AppKey appSecret and privateKey are the only three parameters generated after the packing tool client finishes creating the game. The oauthLoginServer parameter is the API address provided by the game service to login verification

name type description
appKey String
appSecret String
privateKey String
oauthLoginServer String

loadAllPlugins
(
  • callback
  • target
)

load all plugins, the operation includes SDK`s initialization

name type description
callback Function
target object

The object to bind to.

unloadAllPlugins ( )

unload all plugins

getUserPlugin ( ) anysdk.ProtocolUser

get user system plugin

returns:

type: anysdk.ProtocolUser

getIAPPlugins ( ) anysdk.ProtocolIAP

get IAP system plugins

returns:

type: anysdk.ProtocolIAP

getIAPPlugin ( ) anysdk.ProtocolIAP

get IAP system plugin

returns:

type: anysdk.ProtocolIAP

getSocialPlugin ( ) anysdk.ProtocolSocial

get social system plugin

returns:

type: anysdk.ProtocolSocial

getSharePlugin ( ) anysdk.ProtocolShare

get share system plugin

returns:

type: anysdk.ProtocolShare

getAnalyticsPlugin ( ) anysdk.ProtocolAnalytics

get analytics system plugin

returns:

type: anysdk.ProtocolAnalytics

getAdsPlugin ( ) anysdk.ProtocolAds

get ads system plugin

returns:

type: anysdk.ProtocolAds

getPushPlugin ( ) anysdk.ProtocolPush

get push system plugin

returns:

type: anysdk.ProtocolPush

getRECPlugin ( ) anysdk.ProtocolREC

get REC system plugin

returns:

type: anysdk.ProtocolREC

getCrashPlugin ( ) anysdk.ProtocolCrash

get crash system plugin

returns:

type: anysdk.ProtocolCrash

getAdTrackingPlugin ( ) anysdk.ProtocolAdTracking

get ad track system plugin

returns:

type: anysdk.ProtocolAdTracking

getCustomPlugin ( ) anysdk.ProtocolCustom

get custom system plugin

returns:

type: anysdk.ProtocolCustom

getCustomParam ( ) String

get custom parameter

returns:

type: String

getChannelId ( ) String

get channel id

returns:

type: String

isAnaylticsEnabled ( ) boolean

get status of analytics

returns:

type: boolean

setIsAnaylticsEnabled
(
  • enabled
)

set whether to analytics

name type description
enabled boolean

end ( ) static

destory instance

getInstance ( ) anysdk.AgentManager static

get instance

returns:

type: anysdk.AgentManager

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index