甘艺伟 5 днів тому
батько
коміт
6fac0a9fe0

+ 187 - 2
assets/bundle/gridMap/UECube.prefab

@@ -22,16 +22,19 @@
       },
       {
         "__id__": 8
+      },
+      {
+        "__id__": 11
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 11
+        "__id__": 16
       }
     ],
     "_prefab": {
-      "__id__": 12
+      "__id__": 17
     },
     "_opacity": 255,
     "_color": {
@@ -382,6 +385,188 @@
     "sync": false
   },
   {
+    "__type__": "cc.Node",
+    "_name": "node_waitMerge",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 12
+      }
+    ],
+    "_active": false,
+    "_components": [],
+    "_prefab": {
+      "__id__": 15
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "jbsp",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 11
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 13
+      }
+    ],
+    "_prefab": {
+      "__id__": 14
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 45,
+      "height": 45
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 12
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "90e3feaa-9070-4997-bb44-34ff0fc6bcac"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "9emx1dVZFLN6YexNPy3AVS",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "d3zkMWV+9HyI8AGUYYRHJJ",
+    "sync": false
+  },
+  {
     "__type__": "03c073JvHlParUW0UaW/tbe",
     "_name": "",
     "_objFlags": 0,

+ 154 - 6
assets/bundle/gridMap/UEGridMap.prefab

@@ -24,14 +24,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 11
+        "__id__": 15
       },
       {
-        "__id__": 12
+        "__id__": 16
       }
     ],
     "_prefab": {
-      "__id__": 13
+      "__id__": 17
     },
     "_opacity": 255,
     "_color": {
@@ -95,11 +95,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 9
+        "__id__": 13
       }
     ],
     "_prefab": {
-      "__id__": 10
+      "__id__": 14
     },
     "_opacity": 255,
     "_color": {
@@ -161,12 +161,18 @@
       },
       {
         "__id__": 6
+      },
+      {
+        "__id__": 8
+      },
+      {
+        "__id__": 10
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 8
+      "__id__": 12
     },
     "_opacity": 255,
     "_color": {
@@ -358,6 +364,148 @@
     "sync": false
   },
   {
+    "__type__": "cc.Node",
+    "_name": "tipLayer",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 3
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "aeIFqSeCxL7aEYRr/CvawA",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "effectLayer",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 3
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 11
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "5a/JfZ6k1AwbjLs4y1/sBh",
+    "sync": false
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 1278 - 0
assets/bundle/gridMap/UEMergeTip.prefab

@@ -0,0 +1,1278 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "UEMergeTip",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 26
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 34
+      }
+    ],
+    "_prefab": {
+      "__id__": 35
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "item1",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 6
+      }
+    ],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 80,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        95,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 64,
+      "height": 64
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "d727e476-dc27-486f-aeeb-b504800d1b2a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "f6+s/ffn1NHo+K+6355YoY",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "node_lock",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 8
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 75
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e8a8a8c8-f1d0-40d2-bbf9-07691a3c3dd6"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "ebXMFNpQdPhqFj+Zw4Shum",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "153+q7TG5IDozLcmtk248S",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "item2",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 11
+      },
+      {
+        "__id__": 14
+      }
+    ],
+    "_active": false,
+    "_components": [],
+    "_prefab": {
+      "__id__": 17
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 80,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        49,
+        95,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 10
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 12
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 64,
+      "height": 64
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "d727e476-dc27-486f-aeeb-b504800d1b2a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "cbpyo0dXpLBqBuNiK5n6FD",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "node_lock",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 10
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_prefab": {
+      "__id__": 16
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 75
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e8a8a8c8-f1d0-40d2-bbf9-07691a3c3dd6"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "5aVJHsejhP+rUnTsfg5qwK",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "a1NrnlatVKl785T0y6v/40",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "item3",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 19
+      },
+      {
+        "__id__": 22
+      }
+    ],
+    "_active": false,
+    "_components": [],
+    "_prefab": {
+      "__id__": 25
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 80,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -67,
+        -51,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 18
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 20
+      }
+    ],
+    "_prefab": {
+      "__id__": 21
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 64,
+      "height": 64
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 19
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "d727e476-dc27-486f-aeeb-b504800d1b2a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "02KxQUN0NMbZZwIDxxFtNz",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "node_lock",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 18
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 23
+      }
+    ],
+    "_prefab": {
+      "__id__": 24
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 75
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e8a8a8c8-f1d0-40d2-bbf9-07691a3c3dd6"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "34xPPDGIlDYI2KEhzOwRWz",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "18EphgV4pNvZQqyn6XqEvG",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "item4",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 27
+      },
+      {
+        "__id__": 30
+      }
+    ],
+    "_active": false,
+    "_components": [],
+    "_prefab": {
+      "__id__": 33
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 80,
+      "height": 80
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        127,
+        -51,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": {
+      "__id__": 29
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 64,
+      "height": 64
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 27
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "d727e476-dc27-486f-aeeb-b504800d1b2a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "12L89N0IpEXqlMosiq85V7",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "node_lock",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 31
+      }
+    ],
+    "_prefab": {
+      "__id__": 32
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 75
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 30
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e8a8a8c8-f1d0-40d2-bbf9-07691a3c3dd6"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "13MGDziWxE2Y9FGTdqm0rl",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "88ry/R8/9Gx4cwFcVn3DT+",
+    "sync": false
+  },
+  {
+    "__type__": "88666ZyEn1MXJV6Sku230uw",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 9 - 0
assets/bundle/gridMap/UEMergeTip.prefab.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.3.2",
+  "uuid": "f241c68d-dfd2-47bf-ada8-ec00a00360a4",
+  "importer": "prefab",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/bundle/gridMap/images.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "78a5f0ea-00ab-4630-8f6f-99821e86f158",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 3 - 0
assets/bundle/gridMap/images/AutoAtlas.pac

@@ -0,0 +1,3 @@
+{
+    "__type__": "cc.SpriteAtlas"
+}

+ 23 - 0
assets/bundle/gridMap/images/AutoAtlas.pac.meta

@@ -0,0 +1,23 @@
+{
+  "ver": "1.2.5",
+  "uuid": "a656e1de-56f7-4199-9f67-398feb8915c2",
+  "importer": "auto-atlas",
+  "maxWidth": 1024,
+  "maxHeight": 1024,
+  "padding": 2,
+  "compressionLevel": 6,
+  "allowRotation": true,
+  "forceSquared": false,
+  "powerOfTwo": false,
+  "algorithm": "MaxRects",
+  "format": "png",
+  "quality": 80,
+  "contourBleed": true,
+  "paddingBleed": true,
+  "filterUnused": true,
+  "packable": false,
+  "premultiplyAlpha": false,
+  "filterMode": "bilinear",
+  "platformSettings": {},
+  "subMetas": {}
+}

BIN
assets/bundle/gridMap/images/circlebg.png


+ 38 - 0
assets/bundle/gridMap/images/circlebg.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "52fe377d-635c-41f1-a755-20eb4c4352c4",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 64,
+  "height": 64,
+  "platformSettings": {},
+  "subMetas": {
+    "circlebg": {
+      "ver": "1.0.6",
+      "uuid": "d727e476-dc27-486f-aeeb-b504800d1b2a",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "52fe377d-635c-41f1-a755-20eb4c4352c4",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 64,
+      "height": 64,
+      "rawWidth": 64,
+      "rawHeight": 64,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/bundle/gridMap/images/suo_4.png


+ 38 - 0
assets/bundle/gridMap/images/suo_4.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "4787cd1f-43c9-42b3-aaa5-42bddef4af26",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 76,
+  "height": 75,
+  "platformSettings": {},
+  "subMetas": {
+    "suo_4": {
+      "ver": "1.0.6",
+      "uuid": "e8a8a8c8-f1d0-40d2-bbf9-07691a3c3dd6",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "4787cd1f-43c9-42b3-aaa5-42bddef4af26",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 76,
+      "height": 75,
+      "rawWidth": 76,
+      "rawHeight": 75,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/bundle/gridMap/images/unknow_sp.png


+ 38 - 0
assets/bundle/gridMap/images/unknow_sp.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "6173767e-3988-4d74-b755-d66668c4d8fc",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 45,
+  "height": 45,
+  "platformSettings": {},
+  "subMetas": {
+    "unknow_sp": {
+      "ver": "1.0.6",
+      "uuid": "90e3feaa-9070-4997-bb44-34ff0fc6bcac",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "6173767e-3988-4d74-b755-d66668c4d8fc",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 45,
+      "height": 45,
+      "rawWidth": 45,
+      "rawHeight": 45,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 3 - 0
assets/bundle/gridMap/mergeEquip/AutoAtlas.pac

@@ -0,0 +1,3 @@
+{
+    "__type__": "cc.SpriteAtlas"
+}

+ 23 - 0
assets/bundle/gridMap/mergeEquip/AutoAtlas.pac.meta

@@ -0,0 +1,23 @@
+{
+  "ver": "1.2.5",
+  "uuid": "bf87cc1b-25cb-49b6-ad1e-d77c81c7b579",
+  "importer": "auto-atlas",
+  "maxWidth": 1024,
+  "maxHeight": 1024,
+  "padding": 2,
+  "compressionLevel": 6,
+  "allowRotation": true,
+  "forceSquared": false,
+  "powerOfTwo": false,
+  "algorithm": "MaxRects",
+  "format": "png",
+  "quality": 80,
+  "contourBleed": true,
+  "paddingBleed": true,
+  "filterUnused": true,
+  "packable": false,
+  "premultiplyAlpha": false,
+  "filterMode": "bilinear",
+  "platformSettings": {},
+  "subMetas": {}
+}

+ 3 - 0
assets/bundle/gridMap/mergeProp/AutoAtlas.pac

@@ -0,0 +1,3 @@
+{
+    "__type__": "cc.SpriteAtlas"
+}

+ 23 - 0
assets/bundle/gridMap/mergeProp/AutoAtlas.pac.meta

@@ -0,0 +1,23 @@
+{
+  "ver": "1.2.5",
+  "uuid": "487a8f0b-9ee7-4b2d-9772-4232f25afb8b",
+  "importer": "auto-atlas",
+  "maxWidth": 1024,
+  "maxHeight": 1024,
+  "padding": 2,
+  "compressionLevel": 6,
+  "allowRotation": true,
+  "forceSquared": false,
+  "powerOfTwo": false,
+  "algorithm": "MaxRects",
+  "format": "png",
+  "quality": 80,
+  "contourBleed": true,
+  "paddingBleed": true,
+  "filterUnused": true,
+  "packable": false,
+  "premultiplyAlpha": false,
+  "filterMode": "bilinear",
+  "platformSettings": {},
+  "subMetas": {}
+}

+ 3 - 0
assets/bundle/gridMap/qualityBg/AutoAtlas.pac

@@ -0,0 +1,3 @@
+{
+    "__type__": "cc.SpriteAtlas"
+}

+ 23 - 0
assets/bundle/gridMap/qualityBg/AutoAtlas.pac.meta

@@ -0,0 +1,23 @@
+{
+  "ver": "1.2.5",
+  "uuid": "54d7f837-ff41-4582-8a3d-0b1aa0c7363b",
+  "importer": "auto-atlas",
+  "maxWidth": 1024,
+  "maxHeight": 1024,
+  "padding": 2,
+  "compressionLevel": 6,
+  "allowRotation": true,
+  "forceSquared": false,
+  "powerOfTwo": false,
+  "algorithm": "MaxRects",
+  "format": "png",
+  "quality": 80,
+  "contourBleed": true,
+  "paddingBleed": true,
+  "filterUnused": true,
+  "packable": false,
+  "premultiplyAlpha": false,
+  "filterMode": "bilinear",
+  "platformSettings": {},
+  "subMetas": {}
+}

+ 97 - 6
assets/script/data/model/GridMap/GridMapModel.ts

@@ -3,8 +3,10 @@ import { GridMapModelData } from "./GridMapModelData";
 import { ReqHcMerge } from "../../../shared/hc/PtlHcMerge";
 import EventMng from "../../../manager/EventMng";
 import { GridEvent } from "../../../logic/gridMap/GridEvent";
-import { ReqHcInfo } from "../../../shared/hc/PtlHcInfo";
+import { HcType, HcUnlock, ReqHcInfo } from "../../../shared/hc/PtlHcInfo";
 import Gamecfg from "../../../common/gameCfg";
+import UECell from "../../../logic/gridMap/UECell";
+import UEGridMap from "../../../logic/gridMap/UEGridMap";
 
 /** 合成物品数据 */
 export interface MergeItem {
@@ -17,17 +19,24 @@ export default class GridMapModel extends GridMapModelData {
     /** 配方可合成的物品 */
     public formulaMap: { [key: string]: MergeItem[] } = {};
     /** 可合成物品的配方 */
-    public itemFormula: { [key: string]: string } = {};
+    public itemFormula: { [key: string]: string[] } = {};
+    private ueGridMap: UEGridMap;
     constructor() {
         super('gridMap');
     }
 
     protected onRegister(): void {
 
+
+    }
+
+    Init(ueGridMap: UEGridMap) {
+        this.ueGridMap = ueGridMap;
+        this.FilterMergeChain();
     }
 
     /** 过滤合成链 */
-    filterMergeChain() {
+    FilterMergeChain() {
         this.formulaMap = {};
         this.itemFormula = {};
         for (let key in Gamecfg.mergeMerge.pool) {
@@ -39,7 +48,10 @@ export default class GridMapModel extends GridMapModelData {
                 let mergeItemRate = item[`rate${idx}`];
                 if (mergeItem) {
                     this.formulaMap[formulaKey].push({ type: mergeItem[0], id: mergeItem[1], rate: mergeItemRate });
-                    this.itemFormula[`${mergeItem[0]}_${mergeItem[1]}`] = formulaKey;
+                    if (!this.itemFormula[`${mergeItem[0]}_${mergeItem[1]}`]) {
+                        this.itemFormula[`${mergeItem[0]}_${mergeItem[1]}`] = [];
+                    }
+                    this.itemFormula[`${mergeItem[0]}_${mergeItem[1]}`].push(formulaKey);
                 }
             }
         }
@@ -59,10 +71,89 @@ export default class GridMapModel extends GridMapModelData {
     // 请求合成
     async sendHcMerge(param: ReqHcMerge) {
         let ret = await GameDataCenter.gameServer.ReqApi("hc/HcMerge", param);
-        if (ret?.res) {
-            EventMng.emit(GridEvent.HC_MERGE_RSP, ret.res);
+        return ret;
+    }
+
+    /** 尝试合成 */
+    public async TryMergeItems(fromCell: UECell, toCell: UECell) {
+        //检测目标格子物品是否可以拖动
+        if (!toCell.GetCube().CanDrag()) {
+            return false;
+        }
+
+        if (toCell.GetCube().CanDrag() || toCell.IsEmpty()) {
+            let ret = await this.sendHcMerge({ gzid1: fromCell.GetZIndex().toString(), gzid2: toCell.GetZIndex().toString() })
+            if (ret && ret.res) {
+                let fCube = ret.res[fromCell.GetZIndex()];
+                let tCube = ret.res[toCell.GetZIndex()];
+                if (toCell.IsEmpty()) {
+                    //格子上没有物品
+                    fromCell.MoveCubeToCell(toCell);
+                    toCell.SetCube(fromCell.GetCube());
+                    fromCell.SetCube(null);
+                } else if (this.CanMergeItems(fromCell, toCell)) {
+                    toCell.GetCube().PlayMergeAnim();
+                    fromCell.ClearCube();
+                    toCell.ClearCube();
+                    EventMng.emit(GridEvent.HC_MERGE_RSP, { cell: toCell, cube: tCube });
+                } else {
+                    this.SwitchCell(fromCell, toCell);
+                }
+            }
+
+        } else {
+            //回到原来位置
+            fromCell.GetCube().BackToOriginalPos(true);
+        }
+
+    }
+
+    /** 交换格子 */
+    private SwitchCell(fromCell: UECell, toCell: UECell): void {
+        let fromCube = fromCell.GetCube();
+        let toCube = toCell.GetCube();
+        fromCell.SetCube(toCube);
+        toCell.SetCube(fromCube);
+        toCube.MoveToNewPos(cc.v3(fromCell.node.x, fromCell.node.y));
+        fromCube.MoveToNewPos(cc.v3(toCell.node.x, toCell.node.y), 0.05);
+    }
+
+
+    /** 将索引转换为位置 */
+    public TranIdxToPos(idx: number): cc.Vec2 {
+        let row = idx % 10;
+        let col = Math.floor(idx / 10);
+        return cc.v2(row - 1, col - 1);
+    }
+
+
+    /** 检测目标格子是否可以放置&合成&交换物品 */
+    public CellCanPut(fromCell: UECell, toCell: UECell): boolean {
+        //目标格子是空格子
+        if (toCell.IsEmpty()) {
+            return true;
         }
+        //检测目标格子物品是否可以拖动
+        if (toCell.GetCube().CanDrag()) {
+            return true;
+        }
+
+        //目标位置是物品,但是可以合成
+        if (this.CanMergeItems(fromCell, toCell)) {
+            return true;
+        }
+
+        return false;
     }
 
+    private CanMergeItems(fromCell: UECell, toCell: UECell): boolean {
+        if (fromCell.GetCube().GetCubeData().type == toCell.GetCube().GetCubeData().type) {
+            return true;
+        }
+
+        return false;
+    }
+
+
 
 }

+ 2 - 1
assets/script/logic/fgui/Home/Home/HomeCtrl.ts

@@ -16,6 +16,7 @@ import { TsrpcNet } from "../../../../network/TsrpcNet";
 import AssetMgr from "../../../../utils/AssetMgr";
 import AssetsBundleMgr from "../../../../utils/AssetsBundleMgr";
 import UEGridMap from "../../../gridMap/UEGridMap";
+import UEMergeTip from "../../../gridMap/UEMergeTip";
 import { BattleMainView } from "../../Battle/BattleMain/BattleMainView";
 import HomeEpsCom from "./HomeEpsCom";
 import HomeTaskCom from "./HomeTaskCom";
@@ -28,7 +29,7 @@ export class HomeCtrl extends FguiViewCtrl<HomeVM> {
     HomeEpsCom: HomeEpsCom;
     HomeTaskCom: HomeTaskCom;
     onCollectRes(resCollector: ResCollector, param: any): void {
-        resCollector.AddUEClass([UEGridMap])
+        resCollector.AddUEClass([UEGridMap, UEMergeTip])
     }
 
     OnInited(): void {

+ 58 - 75
assets/script/logic/gridMap/UEGridMap.ts

@@ -3,12 +3,14 @@ import { gameMethod } from "../../common/gameMethod";
 import { xlsChapterLayout } from "../../common/xlsConfig";
 import GameDataCenter from "../../data/GameDataCenter";
 import UEBase from "../../frameWork/compment/UEBase";
-import { ResHcInfo } from "../../shared/hc/PtlHcInfo";
+import { HcInfoGeziInfo, ResHcInfo } from "../../shared/hc/PtlHcInfo";
 import { ResHcMerge } from "../../shared/hc/PtlHcMerge";
+import AssetMgr from "../../utils/AssetMgr";
 import { GridConstant } from "./GridConstant";
 import { GridEvent } from "./GridEvent";
 import UECell, { I_CellData } from "./UECell";
 import UECube from "./UECube";
+import UEMergeTip from "./UEMergeTip";
 
 const { ccclass, property } = cc._decorator;
 const DRAG_THRESHOLD: number = 10; // 拖动判定阈值(像素)
@@ -28,14 +30,22 @@ export default class UEGridMap extends UEBase {
     cellLayer: cc.Node = null;
     @property(cc.Node)
     cubeLayer: cc.Node = null;
+    @property(cc.Node)
+    tipLayer: cc.Node = null;
+    @property(cc.Node)
+    effectLayer: cc.Node = null;
     cellMap: { [gid: number]: UECell } = {};
     private isDragging: boolean = false;
     private dragStartPos: cc.Vec2 = cc.v2(0, 0);
     private selectedCell: UECell = null!;
     private clickCnt: number = 0;
+    private ueMergeTip: UEMergeTip;
     Init() {
+        this.ueMergeTip = AssetMgr.instantiateUE(UEMergeTip);
+        this.tipLayer.addChild(this.ueMergeTip.node);
         this.gridLayer.setContentSize(GridConstant.CELL_WIDTH * GridConstant.ROW, GridConstant.CELL_HEIGHT * GridConstant.COL);
         // this.LoadMapData();
+        GameDataCenter.gridMap.Init(this);
         this.InitEvent();
         GameDataCenter.gridMap.sendHcInfo({});
     }
@@ -87,8 +97,37 @@ export default class UEGridMap extends UEBase {
         }
     }
 
-    private OnHcMergeRsp(data: ResHcMerge) {
-
+    private OnHcMergeRsp(cell: UECell, data: HcInfoGeziInfo) {
+        let vec = GameDataCenter.gridMap.TranIdxToPos(cell.GetZIndex());
+        let mergeCube = this.CreateCube(vec.y, vec.x);
+        mergeCube.Init({
+            type: 3,
+            id: 10022,
+            zIndex: cell.GetZIndex(),
+            unlock: 0
+        });
+        cell.SetCube(mergeCube);
+        // if (toCell.IsEmpty()) {
+        //     //格子上没有物品
+        //     fromCell.MoveCubeToCell(toCell);
+        //     toCell.SetCube(fromCell.GetCube());
+        //     fromCell.SetCube(null);
+        // } else if (this.CanMergeItems(fromCell, toCell)) {
+        //     toCell.GetCube().PlayMergeAnim();
+        //     fromCell.ClearCube();
+        //     toCell.ClearCube();
+        //     let vec = this.TranIdxToPos(toCell.GetZIndex());
+        //     let mergeCube = this.CreateCube(vec.y, vec.x);
+        //     mergeCube.Init({
+        //         type: 3,
+        //         id: 10022,
+        //         zIndex: toCell.GetZIndex(),
+        //         unlock: 0
+        //     });
+        //     toCell.SetCube(mergeCube);
+        // } else {
+        //     this.SwitchCell(fromCell, toCell);
+        // }
     }
 
     /** 根据索引获取实际像素坐标 */
@@ -159,11 +198,23 @@ export default class UEGridMap extends UEBase {
             const originalPos = cube.node.getPosition();
             cube.node.setPosition(originalPos.x + deltaPos.x, originalPos.y + deltaPos.y);
             this.dragStartPos = touchPos;
+            const targetCell = this.GetCellByPos(touchPos);
+            if (targetCell && targetCell != this.selectedCell) {
+                if (GameDataCenter.gridMap.CellCanPut(this.selectedCell, targetCell)) {
+                    this.ueMergeTip.node.active = true;
+                    this.ueMergeTip.node.setPosition(targetCell.node.getPosition());
+                    this.ueMergeTip.Init({
+                        ueCube1: this.selectedCell.GetCube(),
+                        ueCube2: targetCell.GetCube()
+                    });
+                }
+            }
         }
     }
 
     private OnTouchEnd(event: cc.Event.EventTouch): void {
         this.dragStartPos = null;
+        this.ueMergeTip.node.active = false;
         if (!this.selectedCell) return;
         const touchPos = this.gridLayer.convertToNodeSpaceAR(event.getLocation());
         const targetCell = this.GetCellByPos(touchPos);
@@ -181,7 +232,7 @@ export default class UEGridMap extends UEBase {
         } else {
             if (!this.isDragging) return;
             if (targetCell && targetCell != this.selectedCell) {
-                this.TryMergeItems(this.selectedCell, targetCell);
+                GameDataCenter.gridMap.TryMergeItems(this.selectedCell, targetCell);
                 this.selectedCell.SetSelect(false);
                 targetCell.SetSelect(true);
             } else {
@@ -207,80 +258,12 @@ export default class UEGridMap extends UEBase {
         }
         return null;
     }
-    /** 检测目标格子是否可以放置&合成&交换物品 */
-    private CellCanPut(fromCell: UECell, toCell: UECell): boolean {
-        //目标格子是空格子
-        if (toCell.IsEmpty()) {
-            return true;
-        }
-        //检测目标格子物品是否可以拖动
-        if (toCell.GetCube().CanDrag()) {
-            return true;
-        }
 
-        //目标位置是物品,但是可以合成
-        if (this.CanMergeItems(fromCell, toCell)) {
-            return true;
-        }
 
-        return false;
-    }
 
-    /** 尝试合成 */
-    private TryMergeItems(fromCell: UECell, toCell: UECell) {
-        //检测是否可以合成
-        if (!this.CellCanPut(fromCell, toCell)) {
-            return;
-        }
-        GameDataCenter.gridMap.sendHcMerge({ gzid1: fromCell.GetZIndex().toString(), gzid2: toCell.GetZIndex().toString() })
 
-        // if (toCell.IsEmpty()) {
-        //     //格子上没有物品
-        //     fromCell.MoveCubeToCell(toCell);
-        //     toCell.SetCube(fromCell.GetCube());
-        //     fromCell.SetCube(null);
-        // } else if (this.CanMergeItems(fromCell, toCell)) {
-        //     toCell.GetCube().PlayMergeAnim();
-        //     fromCell.ClearCube();
-        //     toCell.ClearCube();
-        //     let vec = this.TranIdxToPos(toCell.GetZIndex());
-        //     let mergeCube = this.CreateCube(vec.y, vec.x);
-        //     mergeCube.Init({
-        //         type: 3,
-        //         id: 10022,
-        //         zIndex: toCell.GetZIndex(),
-        //         unlock: 0
-        //     });
-        //     toCell.SetCube(mergeCube);
-        // } else {
-        //     this.SwitchCell(fromCell, toCell);
-        // }
-    }
-
-    private TranIdxToPos(idx: number): cc.Vec2 {
-        let row = idx % 10;
-        let col = Math.floor(idx / 10);
-        return cc.v2(row - 1, col - 1);
-    }
-
-    private CanMergeItems(fromCell: UECell, toCell: UECell): boolean {
-        if (fromCell.GetCube().GetCubeData().type == toCell.GetCube().GetCubeData().type) {
-            return true;
-        }
-
-        return false;
-    }
-
-    private SwitchCell(fromCell: UECell, toCell: UECell): void {
-        //交换格子
-        let fromCube = fromCell.GetCube();
-        let toCube = toCell.GetCube();
-        fromCell.SetCube(toCube);
-        toCell.SetCube(fromCube);
-        toCube.MoveToNewPos(cc.v3(fromCell.node.x, fromCell.node.y));
-        fromCube.MoveToNewPos(cc.v3(toCell.node.x, toCell.node.y), 0.05);
-    }
 
+    /** 获取空格子 */
     private GetEmptyCell(): UECell {
         for (const key in this.cellMap) {
             const element = this.cellMap[key];
@@ -296,7 +279,7 @@ export default class UEGridMap extends UEBase {
         let emptyCell = this.GetEmptyCell();
         if (!emptyCell) return;
         targetIdx = emptyCell.GetZIndex();
-        let startPos = this.TranIdxToPos(idx);
+        let startPos = GameDataCenter.gridMap.TranIdxToPos(idx);
         let mergeCube = this.CreateCube(startPos.y, startPos.x);
         mergeCube.Init({
             type: 3,
@@ -306,7 +289,7 @@ export default class UEGridMap extends UEBase {
         });
         emptyCell.SetCube(mergeCube);
         mergeCube.SetZIndex(1000);
-        let targetPos = this.TranIdxToPos(targetIdx);
+        let targetPos = GameDataCenter.gridMap.TranIdxToPos(targetIdx);
 
         // 设置动画时间
         const duration = 0.8;

+ 22 - 0
assets/script/logic/gridMap/UEMergeTip.ts

@@ -0,0 +1,22 @@
+
+import UEBase from "../../frameWork/compment/UEBase";
+import UECube from "./UECube";
+
+const { ccclass, property } = cc._decorator;
+
+export interface I_MergeTipData {
+    ueCube1: UECube;
+    ueCube2: UECube;
+}
+@ccclass
+export default class UEMergeTip extends UEBase {
+    static readonly BundleKey: string = "gridMap";
+    static readonly PrefabUrl: string = "UEMergeTip";
+    static readonly CLS: string = "UEMergeTip";
+
+    data: I_MergeTipData = null!;
+    Init(data: I_MergeTipData) {
+        this.data = data;
+    }
+
+}

+ 10 - 0
assets/script/logic/gridMap/UEMergeTip.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "88666672-127d-4c5c-957a-4a4bb6df4bb0",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}