Cocos Creator API

1.3.0

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

ProtocolAnalytics

analytics protocol

startSession ( )

Start a new session.

stopSession ( )

Stop a session.

setSessionContinueMillis
(
  • millis
)

Set the timeout for expiring a session.

millis Number

Type: long

logError
(
  • errorId
  • message
)

log an error

errorId String
message String

logEvent
(
  • errorId
  • [args ]
)

log an event.

errorId String
args optional Object

optional arguments Type: map

logTimedEventBegin
(
  • eventId
)

Track an event begin.

eventId String

logTimedEventEnd
(
  • eventId
)

Track an event end.

eventId String

setCaptureUncaughtException
(
  • enabled
)

set Whether to catch uncaught exceptions to server.

enabled boolean

setAccount
(
  • paramMap
)

analytics account information

paramMap Object

Type: map

onChargeRequest
(
  • paramMap
)

track user to request payment

paramMap Object

Type: map

onChargeSuccess
(
  • orderID
)

track Successful payment

orderID String

onChargeFail
(
  • paramMap
)

track failed payment

paramMap Object

Type: map

onChargeOnlySuccess
(
  • paramMap
)

track Successful payment

paramMap Object

Type: map

onPurchase
(
  • paramMap
)

track user purchase

paramMap Object

Type: map

onUse
(
  • paramMap
)

track user to use goods

paramMap Object

Type: map

onReward
(
  • paramMap
)

track user to reward goods

paramMap Object

Type: map

startLevel
(
  • paramMap
)

start level

paramMap Object

Type: map

finishLevel
(
  • levelID
)

finish level

levelID String

failLevel
(
  • paramMap
)

failed level

paramMap Object

Type: map

startTask
(
  • paramMap
)

start task

paramMap Object

Type: map

finishTask
(
  • taskID
)

finish task

taskID String

failTask
(
  • paramMap
)

failed task

paramMap Object

Type: map

isFunctionSupported
(
  • functionName
)
boolean

Check whether the function is supported

functionName String

:

getPluginName ( ) String

get plugin name

:

: String

getPluginVersion ( ) String

get plugin version

:

: String

getSDKVersion ( ) String

get SDK version

:

: String

callFuncWithParam
(
  • funName
  • [args ]
)

void methods for reflections with parameter

funName String
args optional Object | anysdk.PluginParam

optional arguments

callStringFuncWithParam
(
  • funName
  • [args ]
)
String

String methods for reflections with parameter

funName String
args optional Object | anysdk.PluginParam

optional arguments

:

: String

callIntFuncWithParam
(
  • funName
  • [args ]
)
Number

int methods for reflections with parameter

funName String
args optional Object | anysdk.PluginParam

optional arguments

:

: Number

Type:int

callBoolFuncWithParam
(
  • funName
  • [args ]
)
boolean

boolean methods for reflections with parameter

funName String
args optional Object | anysdk.PluginParam

optional arguments

:

callFloatFuncWithParam
(
  • funName
  • [args ]
)
Number

float methods for reflections with parameter

funName String
args optional Object | anysdk.PluginParam

optional arguments

:

: Number

Type:float

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