Commit fe52a38a authored by liujiangnan's avatar liujiangnan

feat: 初始化项目

parent 9f5f5457
......@@ -21,7 +21,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onLoadEnd() {
async onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
......
......@@ -87,7 +87,7 @@ export class MyCocosSceneComponent extends cc.Component {
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
cc.assetManager.loadAny(preloadArr, null, null, async (err, data) => {
if (window && window["air"]) {
// window["air"].onCourseInScreen = (next) => {
......@@ -95,10 +95,10 @@ export class MyCocosSceneComponent extends cc.Component {
// this.onLoadEnd();
// next();
// };
this.onLoadEnd();
await this.onLoadEnd();
window["air"].hideAirClassLoading();
} else {
this.onLoadEnd();
await this.onLoadEnd();
}
cc.debug.setDisplayStats(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment