Cocos Creator API

1.4.x

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

ProtocolSocial

Extends PluginProtocol
Module: anysdk

social protocol

Methods

signIn ( )

sign in

signOut ( )

sign out

submitScore
(
  • leadboardID
  • score
)

submit score

name type description
leadboardID String
score Number

Type: long

showLeaderboard
(
  • leaderboardID
)

show the id of Leaderboard page

name type description
leaderboardID String

showAchievements ( )

show the page of achievements

share
(
  • info
)

unlock achievement

name type description
info Object

Type: map

setListener
(
  • listener
  • target
)

set listener

name type description
listener Function
target Object

getListener ( ) Function

get listener

returns:

type: Function

listener

pauseRecording ( )

get friends info Before to invoke, you need to verdict whether this properties existed

interact ( )

interact Before to invoke, you need to verdict whether this properties existed

subscribe ( )

subscribe Before to invoke, you need to verdict whether this properties existed

isFunctionSupported
(
  • functionName
)
boolean

Inherited from PluginProtocol:

Check whether the function is supported

name type description
functionName String

returns:

type: boolean

getPluginName ( ) String

Inherited from PluginProtocol:

get plugin name

returns:

type: String

getPluginVersion ( ) String

Inherited from PluginProtocol:

get plugin version

returns:

type: String

getSDKVersion ( ) String

Inherited from PluginProtocol:

get SDK version

returns:

type: