drgame-cc 1.0.44 → 1.0.45
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.
|
Binary file
|
package/drscript/Define.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { BtnExtra } from "./BtnExtra";
|
|
3
3
|
import TvUi from "./core/TvUi";
|
|
4
|
-
import { EVideoScene } from "./Define";
|
|
4
|
+
import { EVideoScene, IconStyle } from "./Define";
|
|
5
5
|
import GameAnalytics, { AnalyticsAction, AnalyticsEvent, GameAnalyticsPlatform } from "./GameAnalytics";
|
|
6
6
|
import { showRewardVideo } from "./Info";
|
|
7
7
|
import { Loader } from "./Loader";
|
|
@@ -23,7 +23,7 @@ export class PlatformAdapter {
|
|
|
23
23
|
* @param cnName 中文名称
|
|
24
24
|
* @param minigameID 小游戏ID,文档地址:https://doc.weixin.qq.com/sheet/e3_AcEAlgaLALsCNiuHzH2NOQGCjVc3a?scode=AOcA0AdfAAoSqmh5BfAQIA6AYEAB4&tab=BB08J2
|
|
25
25
|
*/
|
|
26
|
-
public static async init(cnName: string, minigameID: number) {
|
|
26
|
+
public static async init(cnName: string, minigameID: number, focusIcon: IconStyle) {
|
|
27
27
|
this._zhName = cnName;
|
|
28
28
|
this.webBridge = new WebBridge();
|
|
29
29
|
var platform = GameAnalyticsPlatform.XiaomiTv;//平台由sdk后续处理
|
|
@@ -39,7 +39,7 @@ export class PlatformAdapter {
|
|
|
39
39
|
configPath: "drres/config/default",
|
|
40
40
|
focus: {
|
|
41
41
|
enabled: true,
|
|
42
|
-
defaultIconKey:
|
|
42
|
+
defaultIconKey: focusIcon
|
|
43
43
|
},
|
|
44
44
|
adSdk: {
|
|
45
45
|
platform: platform
|
|
@@ -264,12 +264,13 @@ export class PlatformAdapter {
|
|
|
264
264
|
}
|
|
265
265
|
if (AdSdk.exitGame) AdSdk.exitGame();
|
|
266
266
|
cc.game.end();
|
|
267
|
-
// var GRoot = window['GRoot'];
|
|
268
|
-
// let bridge: ILobbyBridge = GRoot && GRoot.inst.node.getComponentInChildren('LobbyBridge');
|
|
269
|
-
// bridge && bridge.exitGame();
|
|
270
267
|
}
|
|
271
268
|
|
|
272
|
-
|
|
269
|
+
/** 显示帮助窗口
|
|
270
|
+
* @param url 帮助窗口的url
|
|
271
|
+
* @param cb 回调函数,当帮助窗口关闭后会调用该回调函数
|
|
272
|
+
*/
|
|
273
|
+
public static async showHelperWin(url: string, cb: () => void) {
|
|
273
274
|
var key = `${this._zhName}-isFirst`;
|
|
274
275
|
var isFirst = cc.sys.localStorage.getItem(key);
|
|
275
276
|
if (!isFirst) {
|