Commit b08b4796 authored by Tt's avatar Tt

匹配正确错误

parent 12a542a9
......@@ -421,22 +421,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
if (!lift || !right) return;
// if (lift.data.id == right.data.id) {
let isRight = lift.data.id == right.data.id;
this.playLocalAudio("check")
console.log("匹配成功!···")
lift.getComponent(cc.Button).interactable = false;
right.getComponent(cc.Button).interactable = false;
this.drawLine(lift, right);
// } else {
// // pg.audio.playAudio(this.wrongClip, () => {
// // });
// this.rotateShake(lift, 0.5);
// this.rotateShake(right, 0.5);
// this.resetLayout();
// }
if (lift.data.id == right.data.id) {
let isRight = lift.data.id == right.data.id;
this.playLocalAudio("check")
console.log("匹配成功!···")
lift.getComponent(cc.Button).interactable = false;
right.getComponent(cc.Button).interactable = false;
this.drawLine(lift, right);
} else {
// pg.audio.playAudio(this.wrongClip, () => {
// });
this.rotateShake(lift, 0.5);
this.rotateShake(right, 0.5);
this.resetLayout();
}
}
private resetLayout() {
......
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