drgame-cc 1.0.43 → 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.
package/README.md CHANGED
@@ -91,10 +91,6 @@ node scripts/sync-back.js -p D:/MyCocosProject
91
91
 
92
92
  ## 四、发布流程
93
93
 
94
- 账号信息(请勿把密码明文写入任何文件或提交到仓库):
95
- - npm 官网:https://www.npmjs.com/
96
- - npm 账号:`banshenghuiyi`
97
- - npm 密码:`mao5686005`
98
94
 
99
95
  ### 1. 安全登录(二选一)
100
96
 
@@ -48,6 +48,13 @@
48
48
  "height": 60,
49
49
  "offsetX": -20,
50
50
  "offsetY": 20
51
+ },
52
+ "white": {
53
+ "path": "drres/icons/pointer-white-60",
54
+ "width": 60,
55
+ "height": 60,
56
+ "offsetX": -20,
57
+ "offsetY": 20
51
58
  }
52
59
  },
53
60
  "adSdk": {
Binary file
@@ -19,4 +19,9 @@ export enum EVideoScene {
19
19
  DailyReward = "daily_reward",
20
20
  // 加速
21
21
  Boost = "boost"
22
+ }
23
+
24
+ export enum IconStyle {
25
+ Default = "default",
26
+ White = "white"
22
27
  }
@@ -7,8 +7,7 @@ const { ccclass, property } = cc._decorator;
7
7
 
8
8
  @ccclass
9
9
  export default class HelperWin extends cc.Component {
10
- @property(sp.Skeleton)
11
- spine: sp.Skeleton = null;
10
+ private spine: sp.Skeleton = null;
12
11
 
13
12
  private nativeBackHandler: () => boolean = null;
14
13
 
@@ -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: "default"
42
+ defaultIconKey: focusIcon
43
43
  },
44
44
  adSdk: {
45
45
  platform: platform
@@ -262,12 +262,15 @@ export class PlatformAdapter {
262
262
  this.webBridge.callHandler("router/navigateBack", {}, (a) => { cc.log(a); });
263
263
  return;
264
264
  }
265
- var GRoot = window['GRoot'];
266
- let bridge: ILobbyBridge = GRoot && GRoot.inst.node.getComponentInChildren('LobbyBridge');
267
- bridge && bridge.exitGame();
265
+ if (AdSdk.exitGame) AdSdk.exitGame();
266
+ cc.game.end();
268
267
  }
269
268
 
270
- public static async showHelper(url: string, cb: () => void) {
269
+ /** 显示帮助窗口
270
+ * @param url 帮助窗口的url
271
+ * @param cb 回调函数,当帮助窗口关闭后会调用该回调函数
272
+ */
273
+ public static async showHelperWin(url: string, cb: () => void) {
271
274
  var key = `${this._zhName}-isFirst`;
272
275
  var isFirst = cc.sys.localStorage.getItem(key);
273
276
  if (!isFirst) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drgame-cc",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "道然游戏适配包",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",