Skip to Content
defold-typescript libraries
Lerg

Lerg/extension-cas/cas

CAS Extension

  • GitHub: Lerg/extension-cas — pinned to e312ca3
    1. This repo publishes no releases or tags. Add a commit archive URL — for the pinned commit, https://github.com/Lerg/extension-cas/archive/e312ca31e3cf0becfcc357ea63c37831b5ab4261.zip — to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as cas from "cas"
  • Asset Portal: extension-cas

Functions

cas.init(params: table)

Initializes the extension. This function has to be called first before trying to show any ads.

Parameters

  • params: table — Contains parameters for the call.

cas.validate_integration()

Prints to console SDK integration information.

cas.load(ad_type: number)

Loads a specified ad type. No need to call this function, the ads is loaded automatically.

Parameters

cas.is_loaded(ad_type: number): boolean

Returns true if the specified ad type has been loaded.

Parameters

Returns

  • is_loaded: boolean — Is loaded.

cas.show(ad_type: number)

Displays a loaded ad.

Parameters

cas.hide_banner()

Removes a loaded banner from the screen.

cas.set(param: number, value: number)

Changes settings.

Parameters

  • param: number — Parameter id.
  • value: number — Value id.

Constants

cas.BANNER

cas.INTERSTITIAL

cas.REWARDED

cas.INIT

cas.LOADED

cas.FAILED_TO_LOAD

cas.SHOWN

cas.FAILED

cas.CLICKED

cas.COMPLETE

cas.CLOSED

cas.TAGGED_AUDIENCE

cas.AUDIENCE_CHILDREN

cas.AUDIENCE_NOT_CHILDREN

cas.AUDIENCE_UNDEFINED

cas.CONSENT_ACCEPTED

cas.CONSENT_DENIED

cas.CCPA

cas.CCPA_OPT_IN_SALE

cas.CCPA_OPT_OUT_SALE

cas.MUTED_AD_SOUNDS

cas.TARGETING_AGE

cas.TARGETING_GENDER

cas.TARGETING_KEYWORDS

cas.GENDER_UNKNOWN

cas.GENDER_MALE

cas.GENDER_FEMALE

On this page