Commit 038f81bd authored by Tt's avatar Tt

init

parent 8d989163
......@@ -333,12 +333,11 @@ cc.Class({
//copy-start 把物品的父节点换到中间的box上。
const box_mid = cc.find('Canvas/bg/box_mid');
cc.tween(optionNode).to(0.2, { x: 0, y: 420 }, cc.easing.quadOut).call(() => {
optionNode.parent = box_mid;
}).to(0.2, { x: 0, y: 100 }, cc.easing.quadOut).start();
//copy-end
cc.tween(optionNode)
.to(0.2, { x: 0, y: 100 }, cc.easing.quadOut)
.start();
this.boxJump();
......@@ -371,8 +370,9 @@ cc.Class({
this.optionJump(btnSubmit, 0.05);
this.playEffect("submit");
const box = cc.find("Canvas/bg/box");
if (
box.children.every(
const box_mid = cc.find('Canvas/bg/box_mid');
let children = box.children.concat(box_mid.children);
if (children.every(
(child) => child.optionData.selected == child.optionData.is_right
)
) {
......@@ -525,6 +525,21 @@ cc.Class({
.start();
});
//copy-start 把物品的父节点换到中间的box上。
const box_mid = cc.find('Canvas/bg/box_mid');
box_mid.children
.filter(child => child.optionData.selected)
.forEach(child => {
child.optionData.selected = false;
cc.tween(child)
.to(0.2, { x: child.startPos.x, y: child.startPos.y })
.call(() => {
child.parent = box;
})
.start();
});
//copy-end
this.playEffect("flyBackAll");
},
......
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