Files
cocos4/platforms/runtime/common/engine/game.js
T
PP 0a836ac458 optimize sys info init && move in runtime adapters (#7920)
* optimize sys info init in adapters

update

* update sys init

update sys

* fix sys access

* optimize isWebIOS14OrIPadOS14Env

* update

* update

* update QTT adapter

* update sys.capacities

update sys

* update common && qtt

* add downloadFile to job module

* update engine-adapter

* update DeviceMotionEvent  adaption

* remove legacy qtt

* add link-sure adaption

* fix some bug

* update vivo adaption && fs-utils

* remove legacy link-sure

* remove dom-adapter

* remove HTMLCanvas appended to document

* update vivo

* support COCOS_PLAY

* update adapters to platforms

* remove test code

* add OPPO adapter

* add huawei adapter

* remove test code

* rename folder oppo-mini-game

* rename  folder huawei-quick-game

* rename folder vivo-mini-game
2020-12-15 11:54:13 +08:00

17 lines
526 B
JavaScript

cc.game.restart = function () {
};
jsb.onHide(function (data) {
cc.game.emit(cc.Game.EVENT_HIDE);
});
jsb.onShow(function () {
cc.game.emit(cc.Game.EVENT_SHOW);
});
jsb.onWindowResize && jsb.onWindowResize(function (width, height) {
// Since the initialization of the creator engine may not take place until after the onWindowResize call,
// you need to determine whether the canvas already exists before you can call the setCanvasSize method
cc.game.canvas && cc.view.setCanvasSize(width, height);
});