Commit df7cd19f authored by 范雪寒's avatar 范雪寒

feat: 屏幕适配

parent 32067dad
......@@ -440,7 +440,7 @@
"__id__": 6
},
"_enabled": true,
"alignMode": 1,
"alignMode": 2,
"_target": null,
"_alignFlags": 44,
"_left": 0,
......@@ -959,7 +959,7 @@
"__id__": 9
},
"_enabled": true,
"alignMode": 1,
"alignMode": 2,
"_target": null,
"_alignFlags": 36,
"_left": 0,
......@@ -1170,7 +1170,7 @@
"__id__": 22
},
"_enabled": true,
"alignMode": 1,
"alignMode": 2,
"_target": null,
"_alignFlags": 33,
"_left": 0,
......@@ -2236,7 +2236,7 @@
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"alignMode": 2,
"_target": null,
"_alignFlags": 45,
"_left": 0,
......@@ -3782,7 +3782,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "d437ERVt9MHqOMSwAUKbte"
"_id": "f05W5JjmdFk7xuAgqQkcg3"
},
{
"__type__": "cc.Label",
......@@ -3817,7 +3817,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "48vLlhMTBGDa7zk5THusEE"
"_id": "b2+S45JnBLZLbWhO7q81l2"
},
{
"__type__": "cc.RichText",
......
......@@ -83,7 +83,7 @@ cc.Class({
this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data))
this.preloadItem()
})
});
},
getData(cb) {
......@@ -143,10 +143,15 @@ cc.Class({
},
initView() {
cc.find('Canvas').on('size-changed', this.onSizeChanged.bind(this));
this.initBg();
this.createStars();
},
onSizeChanged() {
cc.director.loadScene(cc.director.getScene().name);
},
initListeners() {
const BtnStart = cc.find('Canvas/bg/BtnStart');
addBtnListener(BtnStart, async () => {
......
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