|
@@ -123,9 +123,13 @@ export class LevelAction extends Component {
|
|
|
}
|
|
|
show_num++;
|
|
|
if (show_num <= default_show_layer_num) {
|
|
|
- layer_action.set_status(1);
|
|
|
+ if (layer_action.layer_status != 1) {
|
|
|
+ layer_action.set_status(1);
|
|
|
+ }
|
|
|
} else if (show_num == (default_show_layer_num + 1)) {
|
|
|
- layer_action.set_status(2);
|
|
|
+ if (layer_action.layer_status != 2) {
|
|
|
+ layer_action.set_status(2);
|
|
|
+ }
|
|
|
} else {
|
|
|
layer_action.set_status(0);
|
|
|
}
|
|
@@ -324,9 +328,8 @@ export class LevelAction extends Component {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- // 取消之前的检测,重新调度
|
|
|
this.unschedule(checkOver);
|
|
|
- this.scheduleOnce(checkOver, 2); // 2 秒后检测
|
|
|
+ this.scheduleOnce(checkOver, 2);
|
|
|
}
|
|
|
|
|
|
protected onDestroy(): void {
|