瀏覽代碼

优化新手引导2_2

zouyong 5 年之前
父節點
當前提交
09e0a2e7fb
共有 2 個文件被更改,包括 10 次插入3 次删除
  1. 1 1
      assets/resources/module/guide/guide.prefab
  2. 9 2
      assets/script/game/module/guide/Guide.ts

+ 1 - 1
assets/resources/module/guide/guide.prefab

@@ -1164,7 +1164,7 @@
     "asset": {
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
     },
-    "fileId": "735OBs8gpNxqHKVA7t6ETQ",
+    "fileId": "80Pou2FnNKnr67Y7RAlw1N",
     "sync": false
     "sync": false
   },
   },
   {
   {

+ 9 - 2
assets/script/game/module/guide/Guide.ts

@@ -107,6 +107,15 @@ export default class Guide extends cc.Component {
                 x = pos.x;
                 x = pos.x;
                 y = pos.y;
                 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;                    
+                }
+
                 //穿透点击目标节点时增加一个事件触发下一步,触发后移除
                 //穿透点击目标节点时增加一个事件触发下一步,触发后移除
                 this.node_click.width = this.node_click.height = 0;
                 this.node_click.width = this.node_click.height = 0;
                 let eventHandler = new cc.Component.EventHandler();
                 let eventHandler = new cc.Component.EventHandler();
@@ -231,8 +240,6 @@ export default class Guide extends cc.Component {
         this.node.destroy();
         this.node.destroy();
     }
     }
 
 
-
-
     ///////////////// 自定义触摸监听 /////////////////
     ///////////////// 自定义触摸监听 /////////////////
     private _eventManager = cc["internal"]["eventManager"];
     private _eventManager = cc["internal"]["eventManager"];
     private _touchListener: any;
     private _touchListener: any;