@chiyou/minigame-framework 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AssetsPackage/GUI/Images/Block.png +0 -0
- package/assets/AssetsPackage/GUI/Images/Block.png.meta +134 -0
- package/assets/AssetsPackage/GUI/Images.meta +9 -0
- package/assets/AssetsPackage/GUI/UIPrefabs/ChessBoard_Card.prefab +509 -0
- package/assets/AssetsPackage/GUI/UIPrefabs/ChessBoard_Card.prefab.meta +13 -0
- package/assets/AssetsPackage/GUI/UIPrefabs.meta +9 -0
- package/assets/AssetsPackage/GUI.meta +11 -0
- package/assets/AssetsPackage/SpriteAtlas/Card_Pattern.plist +1106 -0
- package/assets/AssetsPackage/SpriteAtlas/Card_Pattern.plist.meta +3329 -0
- package/assets/AssetsPackage/SpriteAtlas/Card_Pattern.png +0 -0
- package/assets/AssetsPackage/SpriteAtlas/Card_Pattern.png.meta +134 -0
- package/assets/AssetsPackage/SpriteAtlas/SA_Card.plist +1196 -0
- package/assets/AssetsPackage/SpriteAtlas/SA_Card.plist.meta +3605 -0
- package/assets/AssetsPackage/SpriteAtlas/SA_Card.png +0 -0
- package/assets/AssetsPackage/SpriteAtlas/SA_Card.png.meta +134 -0
- package/assets/AssetsPackage/SpriteAtlas.meta +11 -0
- package/assets/AssetsPackage/SpriteFrame/Card_PatternType_Back.png +0 -0
- package/assets/AssetsPackage/SpriteFrame/Card_PatternType_Back.png.meta +134 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Back_BG.png +0 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Back_BG.png.meta +134 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Back_FG.png +0 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Back_FG.png.meta +134 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Front_BG.png +0 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Front_BG.png.meta +134 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Front_FG.png +0 -0
- package/assets/AssetsPackage/SpriteFrame/Card_TowardType_Front_FG.png.meta +134 -0
- package/assets/AssetsPackage/SpriteFrame.meta +11 -0
- package/assets/AssetsPackage.meta +9 -0
- package/assets/Scenes/Game.scene +831 -0
- package/assets/Scenes/Game.scene.meta +11 -0
- package/assets/Scenes.meta +9 -0
- package/assets/Scripts/Biz.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AbsAdAdapter.ts +312 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AbsAdAdapter.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterBilibili.ts +294 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterBilibili.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterDouYin.ts +650 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterDouYin.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterHonor.ts +782 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterHonor.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterHuaWei.ts +582 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterHuaWei.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterJingDong.ts +298 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterJingDong.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterKuaiShou.ts +575 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterKuaiShou.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterOppo.ts +946 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterOppo.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterTapTap.ts +643 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterTapTap.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterVivo.ts +616 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterVivo.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterWeiXin.ts +847 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterWeiXin.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterXiaoMi.ts +747 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterXiaoMi.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterZhiFuBao.ts +579 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter/AdAdapterZhiFuBao.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/AdAdapter.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/AbsPlatformAdapter.ts +102 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/AbsPlatformAdapter.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterBilibili.ts +660 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterBilibili.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterDesktopBrowser.ts +224 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterDesktopBrowser.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterDouYin.ts +827 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterDouYin.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterHonor.ts +378 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterHonor.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterHuaWei.ts +363 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterHuaWei.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterJingDong.ts +368 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterJingDong.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterKuaiShou.ts +498 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterKuaiShou.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterOppo.ts +323 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterOppo.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterTapTap.ts +617 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterTapTap.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterVivo.ts +377 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterVivo.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterWeiXin.ts +1136 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterWeiXin.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterXiaoMi.ts +377 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterXiaoMi.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterZhiFuBao.ts +483 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter/PlatformAdapterZhiFuBao.ts.meta +9 -0
- package/assets/Scripts/Framework/Adapter/PlatformAdapter.meta +9 -0
- package/assets/Scripts/Framework/Adapter.meta +9 -0
- package/assets/Scripts/Framework/Definition/AdDefinition.ts +284 -0
- package/assets/Scripts/Framework/Definition/AdDefinition.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition/FrameworkBase.ts +15 -0
- package/assets/Scripts/Framework/Definition/FrameworkBase.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition/PrivacyDefinition.ts +95 -0
- package/assets/Scripts/Framework/Definition/PrivacyDefinition.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition/SocialDefinition.ts +21 -0
- package/assets/Scripts/Framework/Definition/SocialDefinition.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition/SystemDefinition.ts +58 -0
- package/assets/Scripts/Framework/Definition/SystemDefinition.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition/UIDefinition.ts +10 -0
- package/assets/Scripts/Framework/Definition/UIDefinition.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition/UserDefinition.ts +17 -0
- package/assets/Scripts/Framework/Definition/UserDefinition.ts.meta +9 -0
- package/assets/Scripts/Framework/Definition.meta +9 -0
- package/assets/Scripts/Framework/Manager/AdMgr.ts +812 -0
- package/assets/Scripts/Framework/Manager/AdMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/AudioMgr.ts +296 -0
- package/assets/Scripts/Framework/Manager/AudioMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/BaseMgr.ts +130 -0
- package/assets/Scripts/Framework/Manager/BaseMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/EventMgr.ts +102 -0
- package/assets/Scripts/Framework/Manager/EventMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/ExcelMgr.ts +188 -0
- package/assets/Scripts/Framework/Manager/ExcelMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/LifeCycleMgr.ts +142 -0
- package/assets/Scripts/Framework/Manager/LifeCycleMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/NodePoolMgr.ts +385 -0
- package/assets/Scripts/Framework/Manager/NodePoolMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/PrivacyMgr.ts +189 -0
- package/assets/Scripts/Framework/Manager/PrivacyMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/ResMgr.ts +420 -0
- package/assets/Scripts/Framework/Manager/ResMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/SocialMgr.ts +250 -0
- package/assets/Scripts/Framework/Manager/SocialMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/SystemMgr.ts +264 -0
- package/assets/Scripts/Framework/Manager/SystemMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/TimerMgr.ts +80 -0
- package/assets/Scripts/Framework/Manager/TimerMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/UIMgr.ts +267 -0
- package/assets/Scripts/Framework/Manager/UIMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager/UserMgr.ts +162 -0
- package/assets/Scripts/Framework/Manager/UserMgr.ts.meta +9 -0
- package/assets/Scripts/Framework/Manager.meta +9 -0
- package/assets/Scripts/Framework/Utils/BezierUtils.ts +273 -0
- package/assets/Scripts/Framework/Utils/BezierUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils/CSVUtils.ts +396 -0
- package/assets/Scripts/Framework/Utils/CSVUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils/LogUtils.ts +32 -0
- package/assets/Scripts/Framework/Utils/LogUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils/NumberUtils.ts +51 -0
- package/assets/Scripts/Framework/Utils/NumberUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils/TaskUtils.ts +27 -0
- package/assets/Scripts/Framework/Utils/TaskUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils/TimeUtils.ts +38 -0
- package/assets/Scripts/Framework/Utils/TimeUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils/WXBizDataCryptUtils.ts +54 -0
- package/assets/Scripts/Framework/Utils/WXBizDataCryptUtils.ts.meta +9 -0
- package/assets/Scripts/Framework/Utils.meta +9 -0
- package/assets/Scripts/Framework.meta +9 -0
- package/assets/Scripts/index.ts +39 -0
- package/assets/Scripts.meta +9 -0
- package/package.json +2 -4
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
import { AbsAdAdapter, BannerAdPosition, InterstitialAdStatus, RewardedVideoAdStatus } from './AbsAdAdapter';
|
|
2
|
+
import { LogUtils } from '../../Utils/LogUtils';
|
|
3
|
+
import { AdDefinition, BannerAd_Info, BannerAd_PlatformInfo, InterstitialAd_Callback_Status, RewardedVideoAd_Callback_Status } from '../../Definition/AdDefinition';
|
|
4
|
+
import { PlatformID } from '../../Definition/SystemDefinition';
|
|
5
|
+
|
|
6
|
+
class ZFBBannerAd {
|
|
7
|
+
unitId: string;
|
|
8
|
+
ad: any;
|
|
9
|
+
errorListener: Function;
|
|
10
|
+
loadListener: Function;
|
|
11
|
+
isRecreating: boolean;
|
|
12
|
+
isFirstLoad: boolean;
|
|
13
|
+
|
|
14
|
+
constructor(adUnitId: string, ad: any, isFirstLoad: boolean) {
|
|
15
|
+
this.unitId = adUnitId;
|
|
16
|
+
this.ad = ad;
|
|
17
|
+
this.errorListener = null;
|
|
18
|
+
this.loadListener = null;
|
|
19
|
+
this.isRecreating = false;
|
|
20
|
+
this.isFirstLoad = isFirstLoad;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public destroy(): void {
|
|
24
|
+
if (this.ad !== null) {
|
|
25
|
+
this.errorListener = null;
|
|
26
|
+
this.loadListener = null;
|
|
27
|
+
|
|
28
|
+
this.ad.destroy();
|
|
29
|
+
this.ad = null;
|
|
30
|
+
}
|
|
31
|
+
this.isRecreating = false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
class ZFBInterstitialAd {
|
|
36
|
+
unitId: string;
|
|
37
|
+
ad: any;
|
|
38
|
+
status: InterstitialAdStatus;
|
|
39
|
+
callback: Function;
|
|
40
|
+
errorListener: Function;
|
|
41
|
+
loadListener: Function;
|
|
42
|
+
closeListener: Function;
|
|
43
|
+
isShowImmediately: boolean;
|
|
44
|
+
|
|
45
|
+
constructor(adUnitId: string, callback: Function) {
|
|
46
|
+
this.unitId = adUnitId;
|
|
47
|
+
this.ad = null;
|
|
48
|
+
this.status = InterstitialAdStatus.Status_Destroyed;
|
|
49
|
+
this.callback = callback;
|
|
50
|
+
this.errorListener = null;
|
|
51
|
+
this.loadListener = null;
|
|
52
|
+
this.closeListener = null;
|
|
53
|
+
this.isShowImmediately = false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public destroy(): void {
|
|
57
|
+
if (this.ad !== null) {
|
|
58
|
+
this.errorListener = null;
|
|
59
|
+
this.loadListener = null;
|
|
60
|
+
this.closeListener = null;
|
|
61
|
+
|
|
62
|
+
this.ad = null;
|
|
63
|
+
}
|
|
64
|
+
this.isShowImmediately = false;
|
|
65
|
+
this.status = InterstitialAdStatus.Status_Destroyed;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
class ZFBRewardedVideoAd {
|
|
70
|
+
unitId: string;
|
|
71
|
+
ad: any;
|
|
72
|
+
status: RewardedVideoAdStatus;
|
|
73
|
+
callback: Function;
|
|
74
|
+
errorListener: Function;
|
|
75
|
+
loadListener: Function;
|
|
76
|
+
closeListener: Function;
|
|
77
|
+
isShowImmediately: boolean;
|
|
78
|
+
|
|
79
|
+
constructor(adUnitId: string, callback: Function) {
|
|
80
|
+
this.unitId = adUnitId;
|
|
81
|
+
this.ad = null;
|
|
82
|
+
this.status = RewardedVideoAdStatus.Status_Destroyed;
|
|
83
|
+
this.callback = callback;
|
|
84
|
+
this.errorListener = null;
|
|
85
|
+
this.loadListener = null;
|
|
86
|
+
this.closeListener = null;
|
|
87
|
+
this.isShowImmediately = false;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public destroy(): void {
|
|
91
|
+
if (this.ad !== null) {
|
|
92
|
+
this.errorListener = null;
|
|
93
|
+
this.loadListener = null;
|
|
94
|
+
this.closeListener = null;
|
|
95
|
+
|
|
96
|
+
this.ad = null;
|
|
97
|
+
}
|
|
98
|
+
this.isShowImmediately = false;
|
|
99
|
+
this.status = RewardedVideoAdStatus.Status_Destroyed;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export class AdAdapterZhiFuBao extends AbsAdAdapter {
|
|
104
|
+
static TAG: string = "AdAdapterZhiFuBao";
|
|
105
|
+
|
|
106
|
+
private zfbInterstitialAd: ZFBInterstitialAd = null;
|
|
107
|
+
private zfbRewardedVideoAd: ZFBRewardedVideoAd = null;
|
|
108
|
+
private zfbBannerAds: ZFBBannerAd[] = [];
|
|
109
|
+
|
|
110
|
+
public init(interstitialAdUnitId: string, interstitialAdCallback: Function, rewardedVideoAdUnitId: string, rewardedVideoAdCallback: Function): void {
|
|
111
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "init()");
|
|
112
|
+
|
|
113
|
+
this.zfbInterstitialAd = new ZFBInterstitialAd(interstitialAdUnitId, interstitialAdCallback);
|
|
114
|
+
this.zfbRewardedVideoAd = new ZFBRewardedVideoAd(rewardedVideoAdUnitId, rewardedVideoAdCallback);
|
|
115
|
+
|
|
116
|
+
this.zfbBannerAds = [];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
public createBannerAd(adUnitId: string): boolean {
|
|
120
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "createBannerAd()");
|
|
121
|
+
|
|
122
|
+
let isFirstLoad: boolean = true;
|
|
123
|
+
for (let i = 0; i < this.zfbBannerAds.length; i++) {
|
|
124
|
+
if (this.zfbBannerAds[i].unitId === adUnitId) {
|
|
125
|
+
isFirstLoad = this.zfbBannerAds[i].isFirstLoad;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
this.destroyBannerAd(adUnitId);
|
|
131
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "createBannerAd() adUnitId=" + adUnitId);
|
|
132
|
+
|
|
133
|
+
let bannerAdInfo: BannerAd_Info = AdDefinition.AdInfoConfig.BannerAd_Info;
|
|
134
|
+
if (bannerAdInfo === null || !bannerAdInfo.shouldShow) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
let bannerAdPlatformInfo: BannerAd_PlatformInfo = AdDefinition.BannerAdStyleConfig.get(PlatformID.ID_MiniGame_ZhiFuBao);
|
|
139
|
+
if (bannerAdPlatformInfo === null) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let bannerAdPosition: BannerAdPosition = this.calcBannerAdPosition(bannerAdInfo, bannerAdPlatformInfo);
|
|
144
|
+
let bannerAdParam: any = {
|
|
145
|
+
adUnitId: adUnitId,
|
|
146
|
+
style: {
|
|
147
|
+
left: bannerAdPosition.left,
|
|
148
|
+
top: bannerAdPosition.top,
|
|
149
|
+
width: bannerAdPosition.realWidth,
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
if (bannerAdPlatformInfo.canAutoRefresh) {
|
|
153
|
+
bannerAdParam.adIntervals = bannerAdPlatformInfo.refreshInterval;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
let bannerAd: any = window["my"].createBannerAd(bannerAdParam);
|
|
157
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "my.createBannerAd() " + (bannerAd !== null ? "success" : "fail"));
|
|
158
|
+
LogUtils.Instance.log("", bannerAd);
|
|
159
|
+
if (!bannerAd) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
let zfbBannerAd: ZFBBannerAd = new ZFBBannerAd(adUnitId, bannerAd, isFirstLoad);
|
|
164
|
+
this.zfbBannerAds.push(zfbBannerAd);
|
|
165
|
+
|
|
166
|
+
zfbBannerAd.errorListener = (err) => {
|
|
167
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbBannerAd.ad.onError()");
|
|
168
|
+
if (err) {
|
|
169
|
+
LogUtils.Instance.log("", err);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!zfbBannerAd.isRecreating) {
|
|
173
|
+
zfbBannerAd.isRecreating = true;
|
|
174
|
+
|
|
175
|
+
this.scheduleOnce(() => {
|
|
176
|
+
zfbBannerAd.isRecreating = false;
|
|
177
|
+
this.createBannerAd(adUnitId);
|
|
178
|
+
}, 15);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
zfbBannerAd.ad.onError(zfbBannerAd.errorListener);
|
|
182
|
+
|
|
183
|
+
zfbBannerAd.loadListener = () => {
|
|
184
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbBannerAd.ad.onLoad()");
|
|
185
|
+
|
|
186
|
+
if (zfbBannerAd.isFirstLoad) {
|
|
187
|
+
zfbBannerAd.isFirstLoad = false;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (this.adMgr.isPermanentAdShowing()) {
|
|
191
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbBannerAd.ad.show()");
|
|
192
|
+
zfbBannerAd.ad.show()
|
|
193
|
+
.then(() => {
|
|
194
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbBannerAd.ad.show() success");
|
|
195
|
+
}).catch((err) => {
|
|
196
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbBannerAd.ad.show() error");
|
|
197
|
+
if (err) {
|
|
198
|
+
LogUtils.Instance.log("", err);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
zfbBannerAd.ad.onLoad(zfbBannerAd.loadListener);
|
|
204
|
+
|
|
205
|
+
if (!bannerAdPlatformInfo.canAutoRefresh) {
|
|
206
|
+
if (!zfbBannerAd.isRecreating) {
|
|
207
|
+
zfbBannerAd.isRecreating = true;
|
|
208
|
+
|
|
209
|
+
this.scheduleOnce(() => {
|
|
210
|
+
zfbBannerAd.isRecreating = false;
|
|
211
|
+
this.createBannerAd(adUnitId);
|
|
212
|
+
}, bannerAdPlatformInfo.refreshInterval);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
public destroyBannerAd(adUnitId: string): void {
|
|
220
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "destroyBannerAd(): adUnitId=" + adUnitId);
|
|
221
|
+
|
|
222
|
+
let index = -1;
|
|
223
|
+
for (let i = 0; i < this.zfbBannerAds.length; i++) {
|
|
224
|
+
if (this.zfbBannerAds[i].unitId === adUnitId) {
|
|
225
|
+
index = i;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (index >= 0) {
|
|
231
|
+
this.zfbBannerAds[index].destroy();
|
|
232
|
+
this.zfbBannerAds.splice(index, 1);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
public showBannerAd(adUnitId: string): void {
|
|
237
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "showBannerAd(): adUnitId=" + adUnitId);
|
|
238
|
+
|
|
239
|
+
for (let i = 0; i < this.zfbBannerAds.length; i++) {
|
|
240
|
+
if (this.zfbBannerAds[i].unitId === adUnitId) {
|
|
241
|
+
this.zfbBannerAds[i].ad.show();
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
public hideBannerAd(adUnitId: string): void {
|
|
248
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "hideBannerAd(): adUnitId=" + adUnitId);
|
|
249
|
+
|
|
250
|
+
for (let i = 0; i < this.zfbBannerAds.length; i++) {
|
|
251
|
+
if (this.zfbBannerAds[i].unitId === adUnitId) {
|
|
252
|
+
this.zfbBannerAds[i].ad.hide();
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
public createInterstitialAd(): void {
|
|
259
|
+
this.destroyInterstitialAd();
|
|
260
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "createInterstitialAd() adUnitId=" + this.zfbInterstitialAd.unitId);
|
|
261
|
+
|
|
262
|
+
let interstitialAd: any = window["my"].createInterstitialAd({
|
|
263
|
+
adUnitId: this.zfbInterstitialAd.unitId
|
|
264
|
+
});
|
|
265
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "my.createInterstitialAd() " + (interstitialAd !== null ? "success" : "fail"));
|
|
266
|
+
LogUtils.Instance.log("", interstitialAd);
|
|
267
|
+
if (!interstitialAd) {
|
|
268
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Error;
|
|
269
|
+
this.zfbInterstitialAd.callback(InterstitialAd_Callback_Status.Status_Error);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
this.zfbInterstitialAd.ad = interstitialAd;
|
|
274
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Init;
|
|
275
|
+
|
|
276
|
+
this.zfbInterstitialAd.errorListener = (err) => {
|
|
277
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.ad.onError()");
|
|
278
|
+
if (err) {
|
|
279
|
+
LogUtils.Instance.log("", err);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (this.zfbInterstitialAd.status !== InterstitialAdStatus.Status_Watching) {
|
|
283
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Error;
|
|
284
|
+
this.zfbInterstitialAd.callback(InterstitialAd_Callback_Status.Status_Error);
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
this.zfbInterstitialAd.ad.onError(this.zfbInterstitialAd.errorListener);
|
|
288
|
+
|
|
289
|
+
this.zfbInterstitialAd.loadListener = () => {
|
|
290
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.ad.onLoad()");
|
|
291
|
+
|
|
292
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Loaded;
|
|
293
|
+
|
|
294
|
+
if (this.zfbInterstitialAd.isShowImmediately) {
|
|
295
|
+
this.zfbInterstitialAd.isShowImmediately = false;
|
|
296
|
+
this._showInterstitialAd();
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
this.zfbInterstitialAd.ad.onLoad(this.zfbInterstitialAd.loadListener);
|
|
300
|
+
|
|
301
|
+
this.zfbInterstitialAd.closeListener = () => {
|
|
302
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.ad.onClose()");
|
|
303
|
+
|
|
304
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Watched;
|
|
305
|
+
this.zfbInterstitialAd.callback(InterstitialAd_Callback_Status.Status_Close);
|
|
306
|
+
|
|
307
|
+
this.createInterstitialAd();
|
|
308
|
+
};
|
|
309
|
+
this.zfbInterstitialAd.ad.onClose(this.zfbInterstitialAd.closeListener);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
public showInterstitialAd(): void {
|
|
313
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "showInterstitialAd()");
|
|
314
|
+
|
|
315
|
+
if (this.zfbInterstitialAd.ad === null) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.status=" + InterstitialAdStatus[this.zfbInterstitialAd.status]);
|
|
320
|
+
switch(this.zfbInterstitialAd.status) {
|
|
321
|
+
case InterstitialAdStatus.Status_Destroyed:
|
|
322
|
+
case InterstitialAdStatus.Status_Watching:
|
|
323
|
+
case InterstitialAdStatus.Status_StartToWatch:
|
|
324
|
+
break;
|
|
325
|
+
case InterstitialAdStatus.Status_Loaded:
|
|
326
|
+
this._showInterstitialAd();
|
|
327
|
+
break;
|
|
328
|
+
case InterstitialAdStatus.Status_Watched:
|
|
329
|
+
case InterstitialAdStatus.Status_Error:
|
|
330
|
+
case InterstitialAdStatus.Status_Init:
|
|
331
|
+
this.createInterstitialAd();
|
|
332
|
+
break;
|
|
333
|
+
default:
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
public destroyInterstitialAd(): void {
|
|
339
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "destroyInterstitialAd()");
|
|
340
|
+
this.zfbInterstitialAd.destroy();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
public isIntersititialAdShowing(): boolean {
|
|
344
|
+
if (this.zfbInterstitialAd.ad === null) {
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
if (this.zfbInterstitialAd.status === InterstitialAdStatus.Status_Watching) {
|
|
348
|
+
return true;
|
|
349
|
+
}
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
protected _loadInterstitialAd(isShowImmediately: boolean): void {
|
|
354
|
+
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
protected _showInterstitialAd(): void {
|
|
358
|
+
if (this.zfbInterstitialAd.status !== InterstitialAdStatus.Status_Loaded) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_StartToWatch;
|
|
363
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.ad.show()");
|
|
364
|
+
this.zfbInterstitialAd.ad.show()
|
|
365
|
+
.then(() => {
|
|
366
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.ad.show() success");
|
|
367
|
+
|
|
368
|
+
if (this.zfbInterstitialAd.status === InterstitialAdStatus.Status_StartToWatch) {
|
|
369
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Watching;
|
|
370
|
+
this.zfbInterstitialAd.callback(InterstitialAd_Callback_Status.Status_Watching);
|
|
371
|
+
}
|
|
372
|
+
}).catch((err) => {
|
|
373
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbInterstitialAd.ad.show() error");
|
|
374
|
+
if (err) {
|
|
375
|
+
LogUtils.Instance.log("", err);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if (this.zfbInterstitialAd.status === InterstitialAdStatus.Status_StartToWatch) {
|
|
379
|
+
this.zfbInterstitialAd.status = InterstitialAdStatus.Status_Loaded;
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
public createRewardedVideoAd(): void {
|
|
385
|
+
this.destroyRewardedVideoAd();
|
|
386
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "createRewardedVideoAd() adUnitId=" + this.zfbRewardedVideoAd.unitId);
|
|
387
|
+
|
|
388
|
+
let rewardedVideoAd: any = window["my"].createRewardedAd({
|
|
389
|
+
adUnitId: this.zfbRewardedVideoAd.unitId
|
|
390
|
+
});
|
|
391
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "my.createRewardedAd() " + (rewardedVideoAd !== null ? "success" : "fail"));
|
|
392
|
+
LogUtils.Instance.log("", rewardedVideoAd);
|
|
393
|
+
if (!rewardedVideoAd) {
|
|
394
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Error;
|
|
395
|
+
this.zfbRewardedVideoAd.callback(RewardedVideoAd_Callback_Status.Status_Error);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
this.zfbRewardedVideoAd.ad = rewardedVideoAd;
|
|
400
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Init;
|
|
401
|
+
|
|
402
|
+
this.zfbRewardedVideoAd.errorListener = (err) => {
|
|
403
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.onError()");
|
|
404
|
+
if (err) {
|
|
405
|
+
LogUtils.Instance.log("", err);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (this.zfbRewardedVideoAd.status !== RewardedVideoAdStatus.Status_Watching) {
|
|
409
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Error;
|
|
410
|
+
this.zfbRewardedVideoAd.callback(RewardedVideoAd_Callback_Status.Status_Error);
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
this.zfbRewardedVideoAd.ad.onError(this.zfbRewardedVideoAd.errorListener);
|
|
414
|
+
|
|
415
|
+
this.zfbRewardedVideoAd.loadListener = () => {
|
|
416
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.onLoad()");
|
|
417
|
+
|
|
418
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Loaded;
|
|
419
|
+
|
|
420
|
+
if (this.zfbRewardedVideoAd.isShowImmediately) {
|
|
421
|
+
this.zfbRewardedVideoAd.isShowImmediately = false;
|
|
422
|
+
this._showRewardedVideoAd();
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
this.zfbRewardedVideoAd.ad.onLoad(this.zfbRewardedVideoAd.loadListener);
|
|
426
|
+
|
|
427
|
+
this.zfbRewardedVideoAd.closeListener = (res) => {
|
|
428
|
+
let isEnded: boolean = (res !== null) ? res.isEnded : false;
|
|
429
|
+
|
|
430
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.onClose()");
|
|
431
|
+
LogUtils.Instance.log("", "isEnded=" + isEnded);
|
|
432
|
+
|
|
433
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Watched;
|
|
434
|
+
if (isEnded) {
|
|
435
|
+
this.zfbRewardedVideoAd.callback(RewardedVideoAd_Callback_Status.Status_Complete);
|
|
436
|
+
} else {
|
|
437
|
+
this.zfbRewardedVideoAd.callback(RewardedVideoAd_Callback_Status.Status_Giveup);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
this.scheduleOnce(() => {
|
|
441
|
+
if (this.zfbRewardedVideoAd.status !== RewardedVideoAdStatus.Status_Loaded) {
|
|
442
|
+
this._loadRewardedVideoAd(false);
|
|
443
|
+
}
|
|
444
|
+
}, 2);
|
|
445
|
+
};
|
|
446
|
+
this.zfbRewardedVideoAd.ad.onClose(this.zfbRewardedVideoAd.closeListener);
|
|
447
|
+
|
|
448
|
+
this.scheduleOnce(() => {
|
|
449
|
+
if (this.zfbRewardedVideoAd.status !== RewardedVideoAdStatus.Status_Loaded) {
|
|
450
|
+
this._loadRewardedVideoAd(false);
|
|
451
|
+
}
|
|
452
|
+
}, 2);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
public showRewardedVideoAd(): void {
|
|
456
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "showRewardedVideoAd()");
|
|
457
|
+
|
|
458
|
+
if (this.zfbRewardedVideoAd.ad === null) {
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.status=" + RewardedVideoAdStatus[this.zfbRewardedVideoAd.status]);
|
|
463
|
+
switch(this.zfbRewardedVideoAd.status) {
|
|
464
|
+
case RewardedVideoAdStatus.Status_Destroyed:
|
|
465
|
+
case RewardedVideoAdStatus.Status_Watching:
|
|
466
|
+
case RewardedVideoAdStatus.Status_StartToWatch:
|
|
467
|
+
break;
|
|
468
|
+
case RewardedVideoAdStatus.Status_Loaded:
|
|
469
|
+
this._showRewardedVideoAd();
|
|
470
|
+
break;
|
|
471
|
+
case RewardedVideoAdStatus.Status_Watched:
|
|
472
|
+
case RewardedVideoAdStatus.Status_Error:
|
|
473
|
+
case RewardedVideoAdStatus.Status_Init:
|
|
474
|
+
this._loadRewardedVideoAd(true);
|
|
475
|
+
break;
|
|
476
|
+
default:
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
public destroyRewardedVideoAd(): void {
|
|
482
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "destroyRewardedVideoAd()");
|
|
483
|
+
this.zfbRewardedVideoAd.destroy();
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
public isRewardedVideoAdLoaded(): boolean {
|
|
487
|
+
if (this.zfbRewardedVideoAd.ad === null) {
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
if (this.zfbRewardedVideoAd.status === RewardedVideoAdStatus.Status_Loaded) {
|
|
491
|
+
return true;
|
|
492
|
+
}
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
public isRewardedVideoAdShowing(): boolean {
|
|
497
|
+
if (this.zfbRewardedVideoAd.ad === null) {
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
if (this.zfbRewardedVideoAd.status === RewardedVideoAdStatus.Status_Watching) {
|
|
501
|
+
return true;
|
|
502
|
+
}
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
protected _loadRewardedVideoAd(isShowImmediately: boolean): void {
|
|
507
|
+
this.zfbRewardedVideoAd.isShowImmediately = isShowImmediately;
|
|
508
|
+
|
|
509
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.load()");
|
|
510
|
+
this.zfbRewardedVideoAd.ad.load()
|
|
511
|
+
.then(() => {
|
|
512
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.load() success");
|
|
513
|
+
}).catch((err) => {
|
|
514
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.load() error");
|
|
515
|
+
if (err) {
|
|
516
|
+
LogUtils.Instance.log("", err);
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
protected _showRewardedVideoAd(): void {
|
|
522
|
+
if (this.zfbRewardedVideoAd.status !== RewardedVideoAdStatus.Status_Loaded) {
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_StartToWatch;
|
|
527
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.show()");
|
|
528
|
+
this.zfbRewardedVideoAd.ad.show()
|
|
529
|
+
.then(() => {
|
|
530
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.show() success");
|
|
531
|
+
|
|
532
|
+
if (this.zfbRewardedVideoAd.status === RewardedVideoAdStatus.Status_StartToWatch) {
|
|
533
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Watching;
|
|
534
|
+
this.zfbRewardedVideoAd.callback(RewardedVideoAd_Callback_Status.Status_Watching);
|
|
535
|
+
}
|
|
536
|
+
}).catch((err) => {
|
|
537
|
+
LogUtils.Instance.log(AdAdapterZhiFuBao.TAG, "zfbRewardedVideoAd.ad.show() error");
|
|
538
|
+
if (err) {
|
|
539
|
+
LogUtils.Instance.log("", err);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
if (this.zfbRewardedVideoAd.status === RewardedVideoAdStatus.Status_StartToWatch) {
|
|
543
|
+
this.zfbRewardedVideoAd.status = RewardedVideoAdStatus.Status_Loaded;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
public createCustomAd(adUnitId: string): boolean {
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
public destroyCustomAd(adUnitId: string): void {
|
|
553
|
+
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
public showCustomAd(adUnitId: string): void {
|
|
557
|
+
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
public hideCustomAd(adUnitId: string): void {
|
|
561
|
+
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
public createPortalAd(adUnitId: string): void {
|
|
565
|
+
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
public destroyPortalAd(adUnitId: string): void {
|
|
569
|
+
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
public showPortalAd(adUnitId: string): void {
|
|
573
|
+
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
public hidePortalAd(adUnitId: string): void {
|
|
577
|
+
|
|
578
|
+
}
|
|
579
|
+
}
|