drgame-cc 1.0.35 → 1.0.37

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
@@ -9,7 +9,7 @@ import ToastManager from "./toast/ToastManager";
9
9
  import { InternalUitl } from "./InternalUitl";
10
10
  /** 平台适配器,名字有点长防止和Platform,Adapter冲突 */
11
11
  export class PlatformAdapter {
12
- private static readonly version = "1.0.0";
12
+ private static readonly version = "1.0.36";
13
13
  private static readonly designWidth = 1920;
14
14
  private static readonly designHeight = 1080;
15
15
  /** 初始化
@@ -223,4 +223,10 @@ export class PlatformAdapter {
223
223
  public static get isCocos() {
224
224
  return window['cc'] != undefined;
225
225
  }
226
+
227
+ /** 退出游戏 */
228
+ public static exitGame() {
229
+ let bridge: ILobbyBridge = cc.director.getScene().getComponentInChildren('LobbyBridge');
230
+ bridge && bridge.exitGame();
231
+ }
226
232
  }
@@ -0,0 +1,5 @@
1
+ declare interface ILobbyBridge {
2
+ /** 退出游戏 */
3
+ exitGame(): void;
4
+ }
5
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drgame-cc",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "道然游戏适配包",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file