123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- declare var wtsdk: any;
- declare namespace webGame {
- class BasePlatform extends core.BasePlatform {
- /** 记录onHide前的静音状态,用于onShow时还原 */
- private _muted;
- systemInfo: SystemInfo;
- ad: BaseADManager;
- moneyActivity: MoneyActivity;
- constructor();
- /**web版本直接用Laya自带的方法获取保存数据本地缓存*/
- getStorageSync(key: string): any;
- setStorageSync(key: string, data: any): void;
- /** 初始化监听事件 */
- private initEvent;
- private stageVisibleChange;
- /**
- * 回到前台的事件处理函数
- */
- private onShow;
- /**
- * 小游戏隐藏到后台事件处理函数。
- */
- private onHide;
- /**
- * 初始化(登陆、获取用户信息、设置默认分享)
- */
- init(): void;
- /**
- * 登陆 - 获取Code
- */
- private login;
- private jsGetHttpParam;
- /**
- * 登陆完成回调
- */
- private loginComplete;
- private httpUserInfoCallback;
- /**震动 */
- vibrate(pattern: number | number[]): void;
- /** 创建桌面图标 */
- addToDeskIcon(isShow: boolean, x?: number, y?: number, parent?: Laya.Node): any;
- /** 保存最高分 */
- saveScore(score: number): void;
- /**游戏开始接口 */
- gameStarted(): void;
- /** 显示或隐藏Banner广告 */
- adBanner(isShow: boolean, position_id?: number): void;
- /** 显示激励式广告 */
- adRewardedVideo(position_id?: number): void;
- /** 显示插屏广告 */
- adInterstitial(position_id?: number): void;
- /** 显示全屏广告流广告 */
- adFullVideo(position_id?: number): void;
- /** 信息流(可以理解为Banner一样的东西) */
- adFeed(isShow: boolean, position_id?: number, gravity?: string): void;
- private _moreGameBtn;
- /**
- * 更多游戏图标
- * @parame isShow 是否显示
- */
- moreGameBtn(isShow: boolean): MoreGameIcon;
- /** 更多游戏按钮参数 */
- protected readonly moreGameParams: {
- x: number;
- y: number;
- w: number;
- h: number;
- appLaunchOptions: any[];
- };
- openMoneyActiviyView(type: core.MoneyActivityType, data?: any): void;
- /**账户的金币信息接口 */
- operateCoin(callback: Laya.Handler): void;
- /**账户的积分信息接口 */
- getUserCoinInfo(Type: core.MoneyType, callback: Laya.Handler): void;
- /**小迈--神策 --自定义事件上报 */
- wzFinishReward(sceneType: number, Level: number, moneyType?: number): void;
- loadRewardVideo(postionID: number): void;
- /**签到初始化 */
- loginSignInit(SuccessCallBack: Laya.Handler): void;
- /**签到一次,保存用户当天签到记录 */
- loginSignLog(onSuccess: Laya.Handler): void;
- /**签到提现 */
- loginSignWithdraw(day: any, amount: any, Rank: any, SuccessCallBack: Laya.Handler): void;
- /**
- * 进度值
- * @param data percent进度值,1-100
- */
- progress(data: {
- percent: number;
- }): any;
- }
- }
- declare namespace webGame {
- class Platform extends BasePlatform implements core.IPlatform {
- constructor();
- showTitle(score: number): void;
- sendLoginCheck(): void;
- /** 更多游戏按钮参数 */
- protected readonly moreGameParams: {
- x: number;
- y: number;
- w: number;
- h: number;
- appLaunchOptions: any[];
- };
- }
- }
- /**
- * 广告
- */
- declare namespace webGame {
- class BaseADManager {
- protected _bannerAd: any;
- protected _rewardedVideoAd: any;
- protected _interstitialAd: any;
- protected _FreeAD: any;
- protected _FullVideoAd: any;
- constructor();
- private createAD;
- /** 创建Banner广告 */
- private createBannerAd;
- /** banner报错 */
- protected onBannerError(err: any): void;
- /** 显示 banner 广告 */
- showBanner(posid: number): void;
- /** 隐藏 banner 广告 */
- hideBanner(posid: number): void;
- /** 创建插屏广告 */
- private createInterstitialAd;
- /** 插屏广告报错 */
- protected onInterstitialAdError(err: any): void;
- /** 插屏广告关闭 */
- protected onInterstitialAdClosed(res: any): void;
- /** 插屏广告加载完成 */
- protected onInterstitialAdLoaded(res: number): void;
- /** 插屏广告预加载 */
- LoadInterstitialAd(posId: number): void;
- /**
- * 显示插屏广告
- */
- showInterstitialAd(posid: number): void;
- /** 创建激励视频广告 */
- private createRewardedVideoAd;
- /** 激励视频广告报错 */
- protected onRewardedVideoAdError(err: any): void;
- /** 激励视频广告关闭 */
- protected onRewardedVideoAdClosed(res: any): void;
- /** 激励视频广告加载完成 */
- protected onRewardedVideoAdLoaded(res: any): void;
- /** 激励视频广告预加载 */
- LoadRewardedVideoAd(posId: number): void;
- /** 显示激励广告 */
- showRewardedVideoAd(posId: number): void;
- private createFreeAd;
- /** FreeAd报错 */
- protected onFreeAdError(err: any): void;
- /** 显示 FreeAd 广告 */
- showFreeAd(posid: number): void;
- /** 隐藏 FreeAd 广告 */
- hideFreeAd(posid: number): void;
- private createFullVideoAd;
- /** 全屏广告广告报错 */
- protected onFullVideoAdError(err: any): void;
- /** 全屏广告广告关闭 */
- protected onFullVideoAdClosed(res: any): void;
- /** 全屏广告广告加载完成 */
- protected onFullVideoAdLoaded(res: any): void;
- /** 全屏广告广告预加载 */
- protected LoadFullVideoAd(posId: number): void;
- /** 显示激励广告 */
- showFullVideoAd(posId: number): void;
- }
- }
- declare namespace webGame {
- class MoneyActivity {
- constructor();
- /**账户的金币信息接口 */
- operateCoin(callback: Laya.Handler): void;
- /**
- * 账户的积分信息接口
- * @param Type 货币类型
- * @param callback
- */
- getUserCoinInfo(Type: core.MoneyType, callback: Laya.Handler): void;
- /******************以下维特部分网赚接口是独立工程调起网赚页接口************************************************************************ */
- ActivityView(type: core.MoneyActivityType, data?: any): void;
- WeiTeSdkParame(type: core.MoneyActivityType, data?: any): any;
- }
- }
- declare namespace webGame {
- class SystemInfo {
- info: {
- appName: string;
- platform: string;
- };
- constructor();
- /** 设备:android,ios */
- readonly device: string;
- /** app名字 */
- readonly appName: string;
- }
- }
- declare namespace webGame {
- class AddToDeskIcon extends Laya.Image {
- private static _instance;
- static show(x?: number, y?: number, parent?: Laya.Node): AddToDeskIcon;
- static hide(): void;
- constructor();
- onEnable(): void;
- onDisable(): void;
- private onClick;
- destroy(): void;
- }
- }
- declare namespace webGame {
- class LoadADTipsView extends Laya.Box {
- private blackBg;
- private lable;
- private str;
- private timeNum;
- constructor();
- onAwake(): void;
- onEnable(): void;
- private onResize;
- private timeCount;
- onDisable(): void;
- destroy(): void;
- }
- }
- declare namespace webGame {
- 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=webGame.d.ts.map
|