kaka 4 éve
szülő
commit
b3afb569bf

+ 10 - 2
assets/resources/data/guide_data.json

@@ -3,6 +3,7 @@
 		"id": "1_1",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "0",
 		"trForm": "2",
 		"dialogPos": ":0::::",
 		"dialogPos1": "",
@@ -16,6 +17,7 @@
 	{
 		"id": "1_2",
 		"trigger": "1",
+		"btnEnable": "1",
 		"trNum": "0",
 		"trForm": "1",
 		"dialogPos": ":200::::",
@@ -31,13 +33,14 @@
 		"id": "1_3",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "0",
 		"trForm": "1",
 		"dialogPos": ":200::::",
 		"dialogPos1": "",
 		"dialogAlignment": "0",
-		"dialog": "<color=8A4312><color=ff0000>倒计时</color>结束后收获农作物\n获得<color=ff0000>红包币</color>!</color>",
+		"dialog": "<color=8A4312><color=ff0000>倒计时</color>结束后收获农作物\n获得<color=ff0000>红包币</color>!</color>",
 		"displayRect": "",
-		"clickRect": "all",
+		"clickRect": "主容器/coregame/MapIconGroup/FarmSystem/MapIcon_Farm1",
 		"finger": "",
 		"lagNext": "0"
 	},
@@ -45,6 +48,7 @@
 		"id": "1_4",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "1",
 		"trForm": "1",
 		"dialogPos": ":200::::",
 		"dialogPos1": "",
@@ -59,6 +63,7 @@
 		"id": "1_5",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "0",
 		"trForm": "1",
 		"dialogPos": "300:::::",
 		"dialogPos1": "",
@@ -73,6 +78,7 @@
 		"id": "1_6",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "1",
 		"trForm": "1",
 		"dialogPos": ":200::::",
 		"dialogPos1": "",
@@ -87,6 +93,7 @@
 		"id": "2_1",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "1",
 		"trForm": "3",
 		"dialogPos": "::::-600:",
 		"dialogPos1": "",
@@ -101,6 +108,7 @@
 		"id": "3_1",
 		"trigger": "1",
 		"trNum": "0",
+		"btnEnable": "1",
 		"trForm": "1",
 		"dialogPos": "300:::::",
 		"dialogPos1": "",

+ 1 - 1
assets/resources/game/coregame/coregame.prefab

@@ -90584,7 +90584,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "MapIcon_Farm",
+    "_name": "MapIcon_Farm1",
     "_objFlags": 0,
     "_parent": {
       "__id__": 47

+ 1 - 0
assets/script/game/data/module/GuideData.ts

@@ -33,6 +33,7 @@ export class GuideData {
             guide.step = parseInt(a[1]);
             guide.trigger = o.trigger;
             guide.tr_num = o.trNum;
+            guide.btnEnable = o.btnEnable;
             guide.tr_form = o.trForm;
             guide.dialog = o.dialog;
             guide.dialog_pos = o.dialogPos;

+ 28 - 17
assets/script/game/module/guide/Guide.ts

@@ -109,22 +109,30 @@ export default class Guide extends cc.Component {
                 x = pos.x;
                 y = pos.y;
 
-                //lastStruggle
-                if (this.crtGuide && this.crtGuide.id == 2 && this.crtStep == 1) {
-                    w = this.targetNode.parent.width;
-                    h = this.targetNode.parent.height;
-                    let pos1 = mk.game.getWorldPos(this.targetNode.parent);
-                    x = pos1.x;
-                    y = pos1.y - h / 2;
-                }
+                // //lastStruggle
+                // if (this.crtGuide && this.crtGuide.id == 2 && this.crtStep == 1) {
+                //     w = this.targetNode.parent.width;
+                //     h = this.targetNode.parent.height;
+                //     let pos1 = mk.game.getWorldPos(this.targetNode.parent);
+                //     x = pos1.x;
+                //     y = pos1.y - h / 2;
+                // }
 
-                //穿透点击目标节点时增加一个事件触发下一步,触发后移除
-                this.node_click.width = this.node_click.height = 0;
-                let eventHandler = new cc.Component.EventHandler();
-                eventHandler.target = this.node;
-                eventHandler.component = "Guide";
-                eventHandler.handler = "clickNodeClick";
-                this.targetNode.getComponent(cc.Button).clickEvents.push(eventHandler);
+                if (this.crtGuide.btnEnable == '1') {
+                    //穿透点击目标节点时增加一个事件触发下一步,触发后移除
+                    this.node_click.width = this.node_click.height = 0;
+                    let eventHandler = new cc.Component.EventHandler();
+                    eventHandler.target = this.node;
+                    eventHandler.component = "Guide";
+                    eventHandler.handler = "clickNodeClick";
+                    this.targetNode.getComponent(cc.Button).clickEvents.push(eventHandler);
+                }
+                else {
+                    this.node_click.x = 0;
+                    this.node_click.y = 0;
+                    this.node_click.width = this.node.width;
+                    this.node_click.height = this.node.height;
+                }
             }
 
             //显示区域由大到小动画
@@ -254,9 +262,12 @@ export default class Guide extends cc.Component {
         mk.audio.playEffect("button");
         cc.Tween.stopAllByTarget(this.node_display);
         console.log("clickNodeClick");
-        if (this.targetNode) {
-            this.targetNode.getComponent(cc.Button).clickEvents.pop();
+        if (this.crtGuide.btnEnable == '1') {
+            if (this.targetNode) {
+                this.targetNode.getComponent(cc.Button).clickEvents.pop();
+            }
         }
+
         if (this.event_data) {
             //event_guide data:1_2 (1_2为新手引导的id)
             mk.event.emit("event_guide", this.event_data);

+ 5 - 3
assets/script/game/module/guide/GuideVO.ts

@@ -7,7 +7,9 @@ export default class GuideVO {
     trigger: number;
     /** 触发条件的数据 如当trigger是关卡时关卡时,为触发关卡 */
     tr_num: number;
-    /** 1头像 2形象 3头像加透明底 4形象加透明底 */
+    /** 按钮是否可以穿透 */
+    btnEnable: string;
+    /** 1头像 2形象 3头像加透明底可穿透 4形象加透明底可穿透 */
     tr_form: number;
     /** 对话内容 */
     dialog: string;
@@ -16,7 +18,7 @@ export default class GuideVO {
     /** 对话框位置--显示区域偏移xy */
     dialog_pos1: string;
     /** 对话文字对齐方式 0左1中2右 */
-    dialog_alignment:string;
+    dialog_alignment: string;
     /** 透明点击区域(与click_node不共存) */
     display_rect: string;
     /** 点击组件名字(必须在代码中预先设置) */
@@ -26,5 +28,5 @@ export default class GuideVO {
     /** 下个时间 */
     lag_next: number;
     /** 使用方形框还是圆角框 0方形框 1圆形框 */
-    display_type:number = 0;
+    display_type: number = 0;
 }

+ 1 - 1
assets/script/mk/system/GuideSystem.ts

@@ -24,7 +24,7 @@ export default class GuideSystem {
         // if (!cc.sys.isNative) {
         //     this.crtGuideID = 1;
         // }
-        // //test
+        //test
         // this.crtGuideID = 0
 
         if (this.crtGuideID >= 9999) {