Commit f81508e1 authored by yu's avatar yu

5.4调整

parent 98c7544e
......@@ -41,9 +41,13 @@ cc.Class({
let db = this.ske.getComponent(dragonBones.ArmatureDisplay)
db.playAnimation('normal', 1);
db.addEventListener("loopComplete", () => {
resolve('');
// resolve('');
})
setTimeout(() => {
resolve('');
}, 2000);
});
}
// update (dt) {},
});
......@@ -10835,12 +10835,12 @@
"startPosition": {
"__type__": "cc.Vec2",
"x": 8000,
"y": -2440.2
"y": -2200
},
"targetPosition": {
"__type__": "cc.Vec2",
"x": 4871.09,
"y": -2440.2
"y": -2200
},
"moveInTime": 1,
"_id": "e8cKr7zhZHuYKHHxTDRZZj"
......
......@@ -365,7 +365,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
desc.getComponent(cc.Label).string = data.text;
setTimeout(() => {
if (desc.width - item.width > -15 && item.name != "type4") {
item.width = desc.width + 30;
item.width = desc.width + 60;
img_laba02.opacity = data.audio_url ? 255 : 0;
}
}, 30);
......@@ -523,21 +523,29 @@ export default class SceneComponent extends MyCocosSceneComponent {
// this.lined.push(line);
let deltaY = pos1.y - pos2.y;
let drawX = pos1.x;
let drawX = pos1.x + 1;
let drawY = pos1.y + 1;
this.schedule(
() => {
// graphics.moveTo(drawX, drawY);
// drawY = drawY - deltaY / 30;
// drawX = ((drawY - pos2.y) * (pos1.x - pos2.x)) / (pos1.y - pos2.y) + pos2.x;
// let a = ((drawY - pos2.y) * (pos1.x - pos2.x));
// let b = (pos1.y - pos2.y) + pos2.x;
// drawX = Math.abs(a / b);
// drawX = drawX - deltaY / 30;
// drawY = ((drawY - pos2.y) * (pos1.x + pos2.x)) / (pos1.y - pos2.y) + pos2.y;
// graphics.lineTo(drawX, drawY);
graphics.moveTo(pos1.x, pos1.y);
graphics.lineTo(pos2.x, pos2.y);
graphics.stroke();
this.resetLayout();
},
0.3 / 30,
30
);
this.scheduleOnce(() => {
this.resetLayout();
}, 0.15);
this._drawIndex++;
if (this._drawIndex >= this.data.item[this.roundIdx].group.length) {
this.scheduleOnce(() => {
......@@ -555,6 +563,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let mouse_end = pg.view.find(this, "mouse_end");
mouse_end.active = true;
mouse_end.getComponent("mouse_end").play().then(() => {
onHomeworkFinish();
})
}, 1800);
}
......@@ -582,7 +591,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (isSpY) item = cc.instantiate(cc.find("items/type1", this.node));
else item = cc.instantiate(cc.find("items/type5", this.node));
} else {
if (isSpY) item = cc.instantiate(cc.find("items/type4", this.node));
if (isSpY) item = cc.instantiate(cc.find("items/type1", this.node));
else item = cc.instantiate(cc.find("items/type5", this.node));
}
} else if (this.upArr.length == 3) {
......@@ -590,7 +599,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (isSpY) item = cc.instantiate(cc.find("items/type1", this.node));
else item = cc.instantiate(cc.find("items/type6", this.node));
} else {
if (isSpY) item = cc.instantiate(cc.find("items/type4", this.node));
if (isSpY) item = cc.instantiate(cc.find("items/type1", this.node));
else item = cc.instantiate(cc.find("items/type6", this.node));
}
}
......
......@@ -415,9 +415,9 @@ export function onHomeworkFinish() {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
if (middleLayerComponent.role == 'student') {
// if (middleLayerComponent.role == 'student') {
middleLayerComponent.onHomeworkFinish(() => { });
}
// }
} else {
console.log('onHomeworkFinish');
}
......
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