Commit c0a4b445 authored by 杨一航's avatar 杨一航

fix

parent 78d981b1
...@@ -239,9 +239,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -239,9 +239,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
const bgNode = cc.find('Canvas/bg'); const bgNode = cc.find('Canvas/bg');
bgNode.scale = this._mapScaleMax; bgNode.scale = this._mapScaleMax;
const cover = cc.find("Canvas/cover") this.cover.width = cc.winSize.width;
cover.width = cc.winSize.width; this.cover.height = cc.winSize.height;
cover.height = cc.winSize.height; this.cover.getChildByName("bg").scale = this._mapScaleMax;
const endRoot = cc.find("Canvas/endRoot") const endRoot = cc.find("Canvas/endRoot")
endRoot.scale = this._mapScaleMax; endRoot.scale = this._mapScaleMax;
...@@ -472,12 +472,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -472,12 +472,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
async openCoursView(node, word) { async openCoursView(node, word) {
this.cover.active = true; this.cover.active = true;
let probar = this.cover.getChildByName("probar"); let probar = this.cover.getChildByName("bg").getChildByName("probar");
let pass = this.cover.getChildByName("pass"); let pass = this.cover.getChildByName("bg").getChildByName("pass");
let loss = this.cover.getChildByName("loss"); let loss = this.cover.getChildByName("bg").getChildByName("loss");
this.cover.getChildByName("bar").removeAllChildren(); this.cover.getChildByName("bg").getChildByName("bar").removeAllChildren();
let icon = cc.instantiate(node); let icon = cc.instantiate(node);
icon.parent = this.cover.getChildByName("bar"); icon.parent = this.cover.getChildByName("bg").getChildByName("bar");
icon.x = 0; icon.x = 0;
icon.y = 0; icon.y = 0;
icon.scale = 1; icon.scale = 1;
...@@ -542,7 +542,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -542,7 +542,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.log("测评分数:" + score); this.log("测评分数:" + score);
if (score >= 70) { if (score >= 70) {
let pass = this.cover.getChildByName("pass"); let pass = this.cover.getChildByName("bg").getChildByName("pass");
pass.active = true; pass.active = true;
pass.scale = 0; pass.scale = 0;
cc.tween(pass).to(0.3, { scale: 0.5 }, { easing: "cubicIn" }).start(); cc.tween(pass).to(0.3, { scale: 0.5 }, { easing: "cubicIn" }).start();
...@@ -559,7 +559,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -559,7 +559,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else { } else {
let loss = this.cover.getChildByName("loss"); let loss = this.cover.getChildByName("bg").getChildByName("loss");
loss.active = true; loss.active = true;
loss.scale = 0; loss.scale = 0;
cc.tween(loss).to(0.3, { scale: 0.5 }, { easing: "cubicIn" }).start(); cc.tween(loss).to(0.3, { scale: 0.5 }, { easing: "cubicIn" }).start();
......
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