|
|
@@ -55,7 +55,7 @@ export default class Guide extends cc.Component {
|
|
|
private nextStep() {
|
|
|
this.crtStep++;
|
|
|
this.crtGuide = this.guides[this.crtStep];
|
|
|
- mk.data.sendDataEvent(DataEventId.guide,`新手引导第${gData.guideData.crtID}_${this.crtStep}步完成`);
|
|
|
+ mk.data.sendDataEvent(DataEventId.guide, `新手引导第${gData.guideData.crtID}_${this.crtStep}步完成`);
|
|
|
this.updateGuide();
|
|
|
}
|
|
|
|
|
|
@@ -115,7 +115,7 @@ export default class Guide extends cc.Component {
|
|
|
h = this.targetNode.parent.height;
|
|
|
let pos1 = mk.game.getWorldPos(this.targetNode.parent);
|
|
|
x = pos1.x;
|
|
|
- y = pos1.y - h / 2;
|
|
|
+ y = pos1.y - h / 2;
|
|
|
}
|
|
|
|
|
|
//穿透点击目标节点时增加一个事件触发下一步,触发后移除
|
|
|
@@ -162,6 +162,7 @@ export default class Guide extends cc.Component {
|
|
|
if (this.crtGuide.dialog_pos != null && this.crtGuide.dialog_pos.length > 0) {
|
|
|
let arr = this.crtGuide.dialog_pos.split(":");
|
|
|
let wedgit = this.node_dialog.getComponent(cc.Widget);
|
|
|
+ wedgit.enabled = true;
|
|
|
for (let i = 0; i < this.widgets.length; i++) {
|
|
|
wedgit[this.widgets[i]] = arr[i] == "" ? null : parseInt(arr[i]);
|
|
|
}
|
|
|
@@ -169,9 +170,7 @@ export default class Guide extends cc.Component {
|
|
|
else {//显示区域偏移
|
|
|
let arr = this.crtGuide.dialog_pos1.split(",");
|
|
|
let wedgit = this.node_dialog.getComponent(cc.Widget);
|
|
|
- for (let i = 0; i < this.widgets.length; i++) {
|
|
|
- wedgit[this.widgets[i]] = null;
|
|
|
- }
|
|
|
+ wedgit.enabled = false;
|
|
|
this.node_dialog.x = x + parseInt(arr[0]);
|
|
|
this.node_dialog.y = y + parseInt(arr[1]);
|
|
|
}
|