Commit 31c06303 authored by Tt's avatar Tt

效果处理

parent c8c50ec8
This diff is collapsed.
......@@ -192,7 +192,9 @@ cc.Class({
const optionNum = this.data.question_arr[questionIdx].option_arr.length;
//TODO:copy---start
const maxOptionHeight = 400;
const maxOptionWidth = (canvasWidth * 0.8) / optionNum;
const maxOptionWidth = (canvasWidth * 0.8) / optionNum > 300 ? 300 : (canvasWidth * 0.8) / optionNum;
const box_mid = cc.find('Canvas/bg/box_mid');
box_mid.removeAllChildren();
//TODO:copy---end
const arr = randomSortByArr(this.data.question_arr[questionIdx].option_arr);
......@@ -262,6 +264,10 @@ cc.Class({
this.playEffect('flyBack');
return;
}
//copy-start 把物品的父节点换到中间的box上。
const box_mid = cc.find('Canvas/bg/box_mid');
optionNode.parent = box_mid;
//copy-end
cc.tween(optionNode)
.to(0.2, { x: 0, y: 100 }, cc.easing.quadOut)
......@@ -350,8 +356,6 @@ cc.Class({
onAnswerRight() {
//TODO:copy
this.showFlower();
this.coolCatSpeakRight(() => {
//TODO:copy
......@@ -397,6 +401,9 @@ cc.Class({
this.jumpToQuestion(this.status.currentQuestionIdx);
}, 0.1 * 1000);
} else {
//TODO:copy---放烟花时机修改
this.showFlower();
this.hideSubmitBtn();
this.coolCatSpeakEnd(() => {
this.showNextBtn();
......
......@@ -18,12 +18,12 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -19,
"trimX": 0,
"trimY": 38,
"width": 386,
"height": 258,
"offsetX": -3.5,
"offsetY": -20.5,
"trimX": 60,
"trimY": 41,
"width": 259,
"height": 255,
"rawWidth": 386,
"rawHeight": 296,
"borderTop": 0,
......
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