Commit b08b4796 authored by Tt's avatar Tt

匹配正确错误

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