Commit 1ec73317 authored by liujiangnan's avatar liujiangnan

feat: 循环检测

parent 3f1d87e0
...@@ -47,6 +47,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -47,6 +47,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
} catch (error) { } catch (error) {
// TODO 三秒内没有检测到对应页码的后续处理; 先加个提示框 // TODO 三秒内没有检测到对应页码的后续处理; 先加个提示框
this.showTips("未检测到对应页面"); this.showTips("未检测到对应页面");
circle.active = false;
await this.startStep1();
} }
} }
async startStep2() { async startStep2() {
...@@ -112,7 +114,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -112,7 +114,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
width: hotRect.width / width, width: hotRect.width / width,
height: hotRect.height / height, height: hotRect.height / height,
} }
this.showTips(`p===${p.x}||${p.y}====rect===${rect.x}||${rect.y}||${rect.width}||${rect.height}`);
const w = p.x > rect.x && p.x < (rect.x + rect.width); const w = p.x > rect.x && p.x < (rect.x + rect.width);
const h = p.y > rect.y && p.y < (rect.y + rect.height); const h = p.y > rect.y && p.y < (rect.y + rect.height);
return w && h; return w && h;
......
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