Cocos Creator API

1.4.x

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

ProtocolAds

Extends PluginProtocol
Module: anysdk

ads protocol

Methods

hideAds
(
  • adstype
  • idx
)

hide ads view

name type description
adstype anysdk.AdsType
idx Number

preloadAds
(
  • adstype
  • idx
)

preload ads view

name type description
adstype anysdk.AdsType
idx Number

queryPoints ( ) Number

query points

returns:

type: Number

isAdTypeSupported
(
  • arg0
)
boolean

get whether the ads type is supported

name type description
arg0 anysdk.AdsType

returns:

type: boolean

spendPoints
(
  • points
)

spend point

name type description
points Number

setListener
(
  • listener
  • target
)

set listener

name type description
listener Function
target Object

getListener ( ) Function

get listener

returns:

type: Function

listener

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 ( )