Commit 49a12a93 authored by Tt's avatar Tt

音频

parent 2cf9fbd9
......@@ -596,7 +596,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
const offsetY = { Red: -90, Blue: -90 };
this._status[color] = idx;
await this.playLocalAudio("正确");
piece.zIndex = 1;
this.showStars(piece);
......@@ -757,7 +756,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
return;
}
this.playLocalAudio("错误弹回");
this.playLocalAudio("落子");
await asyncTweenTo(
node,
0.7,
......@@ -960,6 +959,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
await this.pieceFindRightBlock(rightBlock, idx);
}
await this.playLocalAudio("正确");
this.updateProgress(idx);
pieceRed["cantMove"] = true;
pieceBlue["cantMove"] = true;
......@@ -1164,9 +1164,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
"applicationId": "154838659000009e"
}
if (this.recrodEnd(testData)) {
this.playLocalAudio("正确");
await this.showVoiceGood();
return resolve(true)
} else {
this.playLocalAudio("错误弹回");
await this.showVoiceTry();
return resolve(false);
}
......@@ -1175,9 +1177,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
courseware && courseware.stopTest(async (data) => {
data = JSON.parse(data);
if (this.recrodEnd(data)) {
this.playLocalAudio("正确");
await this.showVoiceGood();
return resolve(true)
} else {
this.playLocalAudio("错误弹回");
await this.showVoiceTry();
return resolve(false);
}
......
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