Commit 03fb7a16 authored by 杨一航's avatar 杨一航

fix

parent 4aa43548
...@@ -863,8 +863,8 @@ ...@@ -863,8 +863,8 @@
0, 0,
0, 0,
1, 1,
1.5, 1.15,
1.5, 1.15,
1 1
] ]
}, },
...@@ -1044,8 +1044,8 @@ ...@@ -1044,8 +1044,8 @@
0, 0,
0, 0,
1, 1,
1.5, 1.15,
1.5, 1.15,
1 1
] ]
}, },
...@@ -1235,8 +1235,8 @@ ...@@ -1235,8 +1235,8 @@
0, 0,
0, 0,
1, 1,
1.5, 1.15,
1.5, 1.15,
1 1
] ]
}, },
......
...@@ -47,6 +47,17 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -47,6 +47,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
private _checkLast: boolean; private _checkLast: boolean;
onLoad() {
super.onLoad();
this.addLoadingLayer();
}
addLoadingLayer() {
const loadingLayerNode = cc.instantiate(this.loadingLayerPrefab);
loadingLayerNode.parent = this.node;
loadingLayerNode.zIndex = 100;
this.loadingLayer = loadingLayerNode.getComponent(LoadingLayer);
}
addPreloadImage() { addPreloadImage() {
// TODO 根据自己的配置预加载图片资源 // TODO 根据自己的配置预加载图片资源
// this._imageResList.push({ url: this.data.pic_url }); // this._imageResList.push({ url: this.data.pic_url });
...@@ -413,11 +424,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -413,11 +424,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
loadingLayer; loadingLayer;
initLoadingLayer() { initLoadingLayer() {
const loadingLayerNode = cc.instantiate(this.loadingLayerPrefab);
loadingLayerNode.parent = this.node;
loadingLayerNode.zIndex = 100;
this.loadingLayer = loadingLayerNode.getComponent(LoadingLayer);
this.loadingLayer.setMaxPlayerNumber(2); this.loadingLayer.setMaxPlayerNumber(2);
this.loadingLayer.onLoadFinished(() => { this.loadingLayer.onLoadFinished(() => {
this.playAudioByUrl(this.data.gameStartAudio); this.playAudioByUrl(this.data.gameStartAudio);
......
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