/** * 广告 */ declare namespace ttGame { class BaseADManager { protected STATE_LOADED: number; protected STATE_SHOW: number; protected STATE_EXPOSURE: number; protected _ids: { bannerAdID: string; rewardedAdID: string; interstitialAdID: string; }; protected _adState: { bannerAdState: number; rewardedAdState: number; interstitialAdState: number; }; protected _bannerAd: any; protected _rewardedVideoAd: any; protected _interstitialAd: any; protected _bannerAdWidth: number; constructor(bannerAdID: string, rewardedAdID: string, interstitialAdID: string); /** 创建Banner广告 */ private createBannerAd; protected onBannerResize(size: any): void; /** banner报错 */ protected onBannerError(err: any): void; /** banner加载完成 */ protected onBannerLoaded(): void; /** 添加状态(加载完或显示),并查看是否曝光(加载完且显示) */ protected addBannerState(state: number): void; /** 显示 banner 广告 */ showBanner(): void; /** 隐藏 banner 广告 */ hideBanner(): void; /** 创建激励视频广告 */ private createRewardedVideoAd; /** 激励视频广告报错 */ protected onRewardedVideoAdError(err: any): void; /** 激励视频广告关闭 */ protected onRewardedVideoAdClosed(res: any): void; /** 激励视频广告加载完成 */ protected onRewardedVideoAdLoaded(res: any): void; /** 添加状态(加载完或显示),并查看是否曝光(加载完且显示) */ protected addRewardedState(state: number): void; /** * 显示激励广告 */ showRewardedVideoAd(): void; /** 创建插屏广告 */ private createInterstitialAd; /** 插屏广告报错 */ protected onInterstitialAdError(err: any): void; /** 插屏广告关闭 */ protected onInterstitialAdClosed(res: any): void; /** 插屏广告加载完成 */ protected onInterstitialAdLoaded(res: any): void; /** 添加状态(加载完或显示),并查看是否曝光(加载完且显示) */ protected addInterstitialState(state: number): void; /** * 显示插屏广告 */ showInterstitialAd(): void; } } declare namespace ttGame { class ADManager extends BaseADManager { constructor(); protected onBannerResize(size: any): void; } } declare var tt: any; declare namespace ttGame { class BasePlatform extends core.BasePlatform { ad: ADManager; /** 平台类型 */ openDataContext: any; private recorder; systemInfo: SystemInfo; appID: string; accessToken: string; constructor(); /** 初始化监听事件 */ private initEvent; /** * 回到前台的事件处理函数 */ private onShow; /** * 小游戏隐藏到后台事件处理函数。 */ private onHide; /** * 初始化(登陆、获取用户信息、设置默认分享) */ init(): void; /** * 登陆 - 获取Code */ private login; /** * 登陆完成回调 */ private loginComplete; /** 获取AccessToken接口 */ private getAccessToken; private httpUserInfoCallback; private setUserInfo; private httpModifyUserInfoCallback; /** * 查看是否已授权 */ private checkSetting; authorizeUserInfo(): void; authorizeScreenRecord(): void; /** * 获取用户信息 */ private getUserInfo; /** 透传资源到子域 */ protected sendRes(): void; /** 获取启动场景(php用到) */ private get startScene(); private _sharing; /** * 设置默认分享(微信小游戏小程序不再支持分享回调https://developers.weixin.qq.com/community/develop/doc/0000447a5b431807af57249a551408) */ private setDefaultShare; /** 关注 */ attention(): void; /** 收藏 */ addToFavorite(): void; /** 获取视频列表页面(字节用) */ getVideoList(): void; /** 跳转到分享的视频播放页面 */ navigateToVideoView(videoId: string): void; /** * 主动分享 */ share(title?: string): void; /** 分享的数据(需要重写) */ protected getShareData(title?: string): any; /** 视频分享 */ shareVideo(videoPath: string): void; /** 视频分享的数据(需要重写) */ protected getVideoShareData(videoPath: string): any; private shareSuccess; private shareFail; private shareComplete; /** 获取本地缓存数据 */ getStorageSync(key: string): any; /** 保存数据本地缓存 */ setStorageSync(key: string, data: any): any; /** * 向开放数据域发送消息 * @param message {} 要发送的消息,message 中及嵌套对象中 key 的 value 只能是 primitive value。即 number、string、boolean、null、undefined。 */ postMessage(message: {}): void; /** 传递UserInfo */ private sendUserInfo; /** clearCanvas */ clearCanvas(): void; /** 显示排行榜 */ showRank(rankType: number): void; /** 关闭排行榜 */ hideRank(): void; /** 排行榜切页(-1上一页 0下一页 >0跳转到具体页数) */ rankChangePage(page: number): void; /** 保存最高分 */ saveScore(score: number): void; /** 显示或隐藏Banner广告 */ adBanner(isShow: boolean): void; /** 显示激励式广告 */ adRewardedVideo(): void; /** 显示插屏广告 */ adInterstitial(): void; /** 显示或隐藏格子广告 */ adGrid(isShow: boolean): void; private initRecorder; /** 开始录屏 */ startRecord(): void; /** 停止录屏 */ stopRecord(): void; private _moreGameBtn; /** * 更多游戏图标 * @parame isShow 是否显示 */ moreGameBtn(isShow: boolean): MoreGameIcon; /** 更多游戏按钮参数 */ protected get moreGameParams(): { x: number; y: number; w: number; h: number; appLaunchOptions: any[]; }; /** 显示更多游戏 */ showMoreGame(): void; } } declare namespace ttGame { class Platform extends BasePlatform implements core.IPlatform { constructor(); /** 普通分享的数据 */ protected getShareData(title?: string): any; /** 视频分享的数据 */ protected getVideoShareData(videoPath: string): any; /** 透传资源到子域 */ protected sendRes(): void; /** 更多游戏按钮参数 */ protected get moreGameParams(): { x: number; y: number; w: number; h: number; appLaunchOptions: any[]; }; /** 显示即将超越好友 */ showSurpass(score: number): void; /**显示称号 */ showTitle(score: number): void; /** 发送登录检查保存分数 */ sendLoginCheck(): void; } } declare var tt: any; declare namespace ttGame { class SendRes { static sendAtlasList(urls: string[]): void; static sendSinglePicList(urls: string[]): void; static sendJsonList(urls: string[]): void; } } declare namespace ttGame { class SystemInfo { info: { SDKUpdateVersion: string; SDKVersion: string; appName: string; batteryLevel: number; benchmarkLevel: number; brand: string; devicePixelRatio: number; errMsg: string; fontSizeSetting: number; language: string; model: string; nativeSDKVersion: string; pixelRatio: number; platform: string; safeArea: { top: number; bottom: number; left: number; right: number; width: number; height: number; }; screenHeight: number; screenWidth: number; statusBarHeight: number; system: string; version: string; wifiSignal: number; windowHeight: number; windowWidth: number; }; constructor(); /** 设备:android,ios */ get device(): string; /** app名字 */ get appName(): string; } } declare namespace ttGame { class MoreGameIcon extends Laya.Box { private ICON_SIZE; private _icon; private _label; private _tweentimeLite; private _appLaunchOptions; private _iconUrls; private _index; constructor(params: { x: number; y: number; w: number; h: number; appLaunchOptions: any[]; }); onAwake(): void; private getRes; onEnable(): void; private changeSkin; private iconLoaded; private onClick; onDisable(): void; destroy(): void; } } //# sourceMappingURL=ttGame.d.ts.map