Commit d0d4798a authored by liujiangnan's avatar liujiangnan

debug

parent fc1185ad
......@@ -33,8 +33,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
async startStep1() {
await this.asyncPlayAudioByUrl(this.data.pageArr[this.currentPageIdx].startAudio);
await asyncDelay(0.3);
const circulate = async () => {
await asyncDelay(0.3);
const circle = cc.find('Canvas/step1/pad/circle');
circle.active = true;
const progress = cc.find('Canvas/step1/pad/circle/progress');
......@@ -42,12 +42,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
bar.progress = 1;
try {
await Promise.race([
this.asyncCountDown(progress, 3),
this.asyncCountDown(progress, 10),
this.checkPage()
]);
this.step = 1;
} catch (error) {
this.showTips(`未检测到对应页面`);
bar.progress = 1;
circle.active = false;
await circulate();
}
......@@ -88,7 +89,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
window["courseware"].closeOsmoFingerRead();
}
reject(new Error('checkpage timeout'));
}, 2800)
}, 10000)
});
const pageId = this.data.pageArr[this.currentPageIdx].pageIdx;
const check = new Promise<void>((resolve, reject) => {
......@@ -131,7 +132,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
const pageId = this.data.pageArr[this.currentPageIdx].pageIdx;
return new Promise<void>((resolve, reject) => {
window["air"].osmoFingerReadCallback = (result) => {
this.showTips("===========");
const resultObj = JSON.parse(result);
const p = resultObj.finger_pos_in_page;
if (p.x == -1 || p.y == -1) {
......
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