Browse Source

Merge branch 'master' of git.mokasz.com:zouyong/team1_nc

wuwangdong 4 years ago
parent
commit
f01f5f4d70

+ 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 - 1
assets/resources/module/cashPro/cashPro.prefab

@@ -1015,7 +1015,7 @@
         "__id__": 84
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 95

+ 7 - 6
assets/resources/module/guide/guide.prefab

@@ -953,7 +953,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "f4ivHhJVBIx6dJqxMbGbIa",
+    "fileId": "67tPswHx5MO4Zt5bsbOULv",
     "sync": false
   },
   {
@@ -1064,7 +1064,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "88oqrV0E9HYZSrgKmHFhPy",
+    "fileId": "cdHHjtTnRKQIQuOinn4J+S",
     "sync": false
   },
   {
@@ -1930,15 +1930,15 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        266.009,
-        614.638,
+        254.965,
+        609.038,
         0,
         0,
         0,
         0,
         1,
-        0.8,
-        0.8,
+        1,
+        1,
         0.8
       ]
     },
@@ -2373,6 +2373,7 @@
       "__id__": 15
     },
     "_enabled": true,
+    "isFitSpecialNode": false,
     "_id": ""
   },
   {

+ 1 - 1
assets/script/before/view/uiItem/PlantItem.ts

@@ -76,7 +76,7 @@ export default class PlantItem extends cc.Component {
         }
         //根据农场等级
         else if (list_data.unlock == 2) {
-            if (gData.gameData.playerProp.gradeLevel >= list_data.value) {
+            if (gData.gameData.playerProp.completeFarmTaskTimes >= list_data.value) {
                 unlock = true;
             }
         }

+ 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;

+ 3 - 6
assets/script/game/module/cashPro/CashPro.ts

@@ -22,23 +22,20 @@ export default class CashPro extends cc.Component {
     update() {
         if (gData.cashPro.init_load) {
             this.showLoad();
+            gData.cashPro.init_load = false;
         }
 
         if (gData.cashPro.init_success) {
             this.tixianSuccess();
+            gData.cashPro.init_success = false;
         }
 
         if (gData.cashPro.init_fail) {
             this.tixianFail();
+            gData.cashPro.init_fail = false;
         }
     }
 
-    lateUpdate() {
-        gData.cashPro.init_load = false;
-        gData.cashPro.init_success = false;
-        gData.cashPro.init_fail = false;
-    }
-
     showLoad() {
         this.loadPart.active = true
         this.loadAni.play('load', 0)

+ 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) {