Преглед изворни кода

测试配置数据 添加调酒杯

woso_javan пре 3 месеци
родитељ
комит
ff95a285af

+ 7 - 3
assets/module_take_goblet/Prefabs/Cup/Cocktail/CocktailFour.prefab

@@ -161,9 +161,9 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 254,
+      "g": 243,
+      "b": 68,
       "a": 255
     },
     "_spriteFrame": {
@@ -1005,7 +1005,11 @@
     "__prefab": {
       "__id__": 65
     },
+    "sprite": {
+      "__id__": 5
+    },
     "cupHeight": 2,
+    "_cupColor": 5,
     "waters": {
       "__id__": 8
     },

+ 7 - 3
assets/module_take_goblet/Prefabs/Cup/Cocktail/CocktailThree.prefab

@@ -161,9 +161,9 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 49,
+      "g": 126,
+      "b": 254,
       "a": 255
     },
     "_spriteFrame": {
@@ -813,7 +813,11 @@
     "__prefab": {
       "__id__": 50
     },
+    "sprite": {
+      "__id__": 5
+    },
     "cupHeight": 2,
+    "_waterColor": 8,
     "waters": {
       "__id__": 8
     },

+ 4 - 0
assets/module_take_goblet/Prefabs/Cup/Cocktail/CocktailTwo.prefab

@@ -666,7 +666,11 @@
     "__prefab": {
       "__id__": 39
     },
+    "sprite": {
+      "__id__": 5
+    },
     "cupHeight": 2,
+    "_waterColor": 8,
     "waters": {
       "__id__": 8
     },

+ 669 - 80
assets/module_take_goblet/Prefabs/Levels/lvl_1.prefab

@@ -31,14 +31,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 156
+        "__id__": 174
       },
       {
-        "__id__": 158
+        "__id__": 176
       }
     ],
     "_prefab": {
-      "__id__": 160
+      "__id__": 178
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -375,7 +375,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
+      "x": -200,
       "y": 0,
       "z": 0
     },
@@ -421,7 +421,7 @@
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
+      "x": 0,
       "y": 0.5
     },
     "_id": ""
@@ -757,7 +757,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
+      "x": 50,
       "y": 0,
       "z": 0
     },
@@ -803,7 +803,7 @@
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
+      "x": 1,
       "y": 0.5
     },
     "_id": ""
@@ -1928,29 +1928,32 @@
         "__id__": 111
       },
       {
-        "__id__": 119
+        "__id__": 121
       },
       {
-        "__id__": 127
+        "__id__": 131
       },
       {
-        "__id__": 135
+        "__id__": 141
+      },
+      {
+        "__id__": 151
       },
       {
-        "__id__": 143
+        "__id__": 161
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 151
+        "__id__": 169
       },
       {
-        "__id__": 153
+        "__id__": 171
       }
     ],
     "_prefab": {
-      "__id__": 155
+      "__id__": 173
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2027,6 +2030,9 @@
       },
       {
         "__id__": 118
+      },
+      {
+        "__id__": 119
       }
     ],
     "removedComponents": []
@@ -2057,8 +2063,8 @@
     ],
     "value": {
       "__type__": "cc.Vec3",
-      "x": -139.851,
-      "y": 91.621,
+      "x": -200.515,
+      "y": 96.54,
       "z": 0
     }
   },
@@ -2093,6 +2099,22 @@
       "z": 0
     }
   },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 120
+    },
+    "propertyPath": [
+      "cupHeight"
+    ],
+    "value": 3
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
   {
     "__type__": "cc.Node",
     "_objFlags": 0,
@@ -2100,14 +2122,14 @@
       "__id__": 110
     },
     "_prefab": {
-      "__id__": 120
+      "__id__": 122
     },
     "__editorExtras__": {}
   },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 119
+      "__id__": 121
     },
     "asset": {
       "__uuid__": "b7afc854-d4f3-4bf8-a325-7553fc5a4cb6",
@@ -2115,7 +2137,7 @@
     },
     "fileId": "c46/YsCPVOJYA4mWEpNYRx",
     "instance": {
-      "__id__": 121
+      "__id__": 123
     },
     "targetOverrides": null
   },
@@ -2129,16 +2151,19 @@
     "mountedComponents": [],
     "propertyOverrides": [
       {
-        "__id__": 122
+        "__id__": 124
       },
       {
-        "__id__": 124
+        "__id__": 126
       },
       {
-        "__id__": 125
+        "__id__": 127
       },
       {
-        "__id__": 126
+        "__id__": 128
+      },
+      {
+        "__id__": 129
       }
     ],
     "removedComponents": []
@@ -2146,7 +2171,7 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 123
+      "__id__": 125
     },
     "propertyPath": [
       "_name"
@@ -2162,22 +2187,22 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 123
+      "__id__": 125
     },
     "propertyPath": [
       "_lpos"
     ],
     "value": {
       "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 91.621,
+      "x": -55.745,
+      "y": 106.377,
       "z": 0
     }
   },
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 123
+      "__id__": 125
     },
     "propertyPath": [
       "_lrot"
@@ -2193,7 +2218,7 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 123
+      "__id__": 125
     },
     "propertyPath": [
       "_euler"
@@ -2205,6 +2230,22 @@
       "z": 0
     }
   },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 130
+    },
+    "propertyPath": [
+      "cupHeight"
+    ],
+    "value": 3
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
   {
     "__type__": "cc.Node",
     "_objFlags": 0,
@@ -2212,14 +2253,14 @@
       "__id__": 110
     },
     "_prefab": {
-      "__id__": 128
+      "__id__": 132
     },
     "__editorExtras__": {}
   },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 127
+      "__id__": 131
     },
     "asset": {
       "__uuid__": "b7afc854-d4f3-4bf8-a325-7553fc5a4cb6",
@@ -2227,7 +2268,7 @@
     },
     "fileId": "c46/YsCPVOJYA4mWEpNYRx",
     "instance": {
-      "__id__": 129
+      "__id__": 133
     },
     "targetOverrides": null
   },
@@ -2241,16 +2282,19 @@
     "mountedComponents": [],
     "propertyOverrides": [
       {
-        "__id__": 130
+        "__id__": 134
       },
       {
-        "__id__": 132
+        "__id__": 136
       },
       {
-        "__id__": 133
+        "__id__": 137
       },
       {
-        "__id__": 134
+        "__id__": 138
+      },
+      {
+        "__id__": 139
       }
     ],
     "removedComponents": []
@@ -2258,7 +2302,7 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 131
+      "__id__": 135
     },
     "propertyPath": [
       "_name"
@@ -2274,22 +2318,22 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 131
+      "__id__": 135
     },
     "propertyPath": [
       "_lpos"
     ],
     "value": {
       "__type__": "cc.Vec3",
-      "x": 129.295,
-      "y": 91.621,
+      "x": 78.469,
+      "y": 112.935,
       "z": 0
     }
   },
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 131
+      "__id__": 135
     },
     "propertyPath": [
       "_lrot"
@@ -2305,7 +2349,7 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 131
+      "__id__": 135
     },
     "propertyPath": [
       "_euler"
@@ -2317,6 +2361,22 @@
       "z": 0
     }
   },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 140
+    },
+    "propertyPath": [
+      "cupHeight"
+    ],
+    "value": 3
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
   {
     "__type__": "cc.Node",
     "_objFlags": 0,
@@ -2324,14 +2384,14 @@
       "__id__": 110
     },
     "_prefab": {
-      "__id__": 136
+      "__id__": 142
     },
     "__editorExtras__": {}
   },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 135
+      "__id__": 141
     },
     "asset": {
       "__uuid__": "b7afc854-d4f3-4bf8-a325-7553fc5a4cb6",
@@ -2339,7 +2399,7 @@
     },
     "fileId": "c46/YsCPVOJYA4mWEpNYRx",
     "instance": {
-      "__id__": 137
+      "__id__": 143
     },
     "targetOverrides": null
   },
@@ -2353,16 +2413,19 @@
     "mountedComponents": [],
     "propertyOverrides": [
       {
-        "__id__": 138
+        "__id__": 144
       },
       {
-        "__id__": 140
+        "__id__": 146
       },
       {
-        "__id__": 141
+        "__id__": 147
       },
       {
-        "__id__": 142
+        "__id__": 148
+      },
+      {
+        "__id__": 149
       }
     ],
     "removedComponents": []
@@ -2370,7 +2433,7 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 139
+      "__id__": 145
     },
     "propertyPath": [
       "_name"
@@ -2386,22 +2449,22 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 139
+      "__id__": 145
     },
     "propertyPath": [
       "_lpos"
     ],
     "value": {
       "__type__": "cc.Vec3",
-      "x": -65.749,
-      "y": -82.115,
+      "x": 209.697,
+      "y": 57.247,
       "z": 0
     }
   },
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 139
+      "__id__": 145
     },
     "propertyPath": [
       "_lrot"
@@ -2417,7 +2480,7 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 139
+      "__id__": 145
     },
     "propertyPath": [
       "_euler"
@@ -2429,6 +2492,22 @@
       "z": 0
     }
   },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 150
+    },
+    "propertyPath": [
+      "cupHeight"
+    ],
+    "value": 3
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
   {
     "__type__": "cc.Node",
     "_objFlags": 0,
@@ -2436,28 +2515,28 @@
       "__id__": 110
     },
     "_prefab": {
-      "__id__": 144
+      "__id__": 152
     },
     "__editorExtras__": {}
   },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 143
+      "__id__": 151
     },
     "asset": {
-      "__uuid__": "b7afc854-d4f3-4bf8-a325-7553fc5a4cb6",
+      "__uuid__": "15999642-db8e-4575-b395-bd0eb8b214fa",
       "__expectedType__": "cc.Prefab"
     },
     "fileId": "c46/YsCPVOJYA4mWEpNYRx",
     "instance": {
-      "__id__": 145
+      "__id__": 153
     },
     "targetOverrides": null
   },
   {
     "__type__": "cc.PrefabInstance",
-    "fileId": "f9q8ia20hCLYPwaQqkqz3v",
+    "fileId": "aem3Ii4IxCF5kL58L0smN9",
     "prefabRootNode": {
       "__id__": 1
     },
@@ -2465,16 +2544,19 @@
     "mountedComponents": [],
     "propertyOverrides": [
       {
-        "__id__": 146
+        "__id__": 154
       },
       {
-        "__id__": 148
+        "__id__": 156
       },
       {
-        "__id__": 149
+        "__id__": 157
       },
       {
-        "__id__": 150
+        "__id__": 158
+      },
+      {
+        "__id__": 159
       }
     ],
     "removedComponents": []
@@ -2482,12 +2564,12 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 147
+      "__id__": 155
     },
     "propertyPath": [
       "_name"
     ],
-    "value": "OriginalThree-004"
+    "value": "OriginalFour"
   },
   {
     "__type__": "cc.TargetInfo",
@@ -2498,22 +2580,22 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 147
+      "__id__": 155
     },
     "propertyPath": [
       "_lpos"
     ],
     "value": {
       "__type__": "cc.Vec3",
-      "x": 69.471,
-      "y": -82.115,
+      "x": -108.623,
+      "y": -95.924,
       "z": 0
     }
   },
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 147
+      "__id__": 155
     },
     "propertyPath": [
       "_lrot"
@@ -2529,7 +2611,135 @@
   {
     "__type__": "CCPropertyOverrideInfo",
     "targetInfo": {
-      "__id__": 147
+      "__id__": 155
+    },
+    "propertyPath": [
+      "_euler"
+    ],
+    "value": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    }
+  },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 160
+    },
+    "propertyPath": [
+      "cupHeight"
+    ],
+    "value": 4
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "d26GZskeZLIroi8wdgvr1w"
+    ]
+  },
+  {
+    "__type__": "cc.Node",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 110
+    },
+    "_prefab": {
+      "__id__": 162
+    },
+    "__editorExtras__": {}
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 161
+    },
+    "asset": {
+      "__uuid__": "eab0a0d9-1a1b-4c20-aaad-3edda02b0f53",
+      "__expectedType__": "cc.Prefab"
+    },
+    "fileId": "c46/YsCPVOJYA4mWEpNYRx",
+    "instance": {
+      "__id__": 163
+    },
+    "targetOverrides": null
+  },
+  {
+    "__type__": "cc.PrefabInstance",
+    "fileId": "e8zkWIfrpMipuNdXvcE9mW",
+    "prefabRootNode": {
+      "__id__": 1
+    },
+    "mountedChildren": [],
+    "mountedComponents": [],
+    "propertyOverrides": [
+      {
+        "__id__": 164
+      },
+      {
+        "__id__": 166
+      },
+      {
+        "__id__": 167
+      },
+      {
+        "__id__": 168
+      }
+    ],
+    "removedComponents": []
+  },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 165
+    },
+    "propertyPath": [
+      "_name"
+    ],
+    "value": "OriginalTwo"
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c46/YsCPVOJYA4mWEpNYRx"
+    ]
+  },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 165
+    },
+    "propertyPath": [
+      "_lpos"
+    ],
+    "value": {
+      "__type__": "cc.Vec3",
+      "x": 37.652,
+      "y": -61.719,
+      "z": 0
+    }
+  },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 165
+    },
+    "propertyPath": [
+      "_lrot"
+    ],
+    "value": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    }
+  },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 165
     },
     "propertyPath": [
       "_euler"
@@ -2551,7 +2761,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 152
+      "__id__": 170
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2579,7 +2789,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 154
+      "__id__": 172
     },
     "_id": ""
   },
@@ -2610,7 +2820,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 157
+      "__id__": 175
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2638,7 +2848,19 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 159
+      "__id__": 177
+    },
+    "outArea": {
+      "__id__": 18
+    },
+    "waitArea": {
+      "__id__": 36
+    },
+    "tempCups": {
+      "__id__": 43
+    },
+    "goblets": {
+      "__id__": 110
     },
     "_id": ""
   },
@@ -2656,19 +2878,56 @@
     },
     "fileId": "c46/YsCPVOJYA4mWEpNYRx",
     "instance": null,
-    "targetOverrides": null,
+    "targetOverrides": [
+      {
+        "__id__": 179
+      },
+      {
+        "__id__": 182
+      },
+      {
+        "__id__": 185
+      },
+      {
+        "__id__": 188
+      },
+      {
+        "__id__": 191
+      },
+      {
+        "__id__": 194
+      },
+      {
+        "__id__": 197
+      },
+      {
+        "__id__": 200
+      },
+      {
+        "__id__": 203
+      },
+      {
+        "__id__": 206
+      },
+      {
+        "__id__": 209
+      }
+    ],
     "nestedPrefabInstanceRoots": [
       {
-        "__id__": 143
+        "__id__": 161
       },
       {
-        "__id__": 135
+        "__id__": 151
       },
       {
-        "__id__": 127
+        "__id__": 141
       },
       {
-        "__id__": 119
+        "__id__": 131
+      },
+      {
+        "__id__": 121
       },
       {
         "__id__": 111
@@ -2692,5 +2951,335 @@
         "__id__": 44
       }
     ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 44
+    },
+    "sourceInfo": {
+      "__id__": 180
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 44
+    },
+    "targetInfo": {
+      "__id__": 181
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0cYUeEFSBOjYr24f53MgsS"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 54
+    },
+    "sourceInfo": {
+      "__id__": 183
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 54
+    },
+    "targetInfo": {
+      "__id__": 184
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0cYUeEFSBOjYr24f53MgsS"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 64
+    },
+    "sourceInfo": {
+      "__id__": 186
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 64
+    },
+    "targetInfo": {
+      "__id__": 187
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0cYUeEFSBOjYr24f53MgsS"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 74
+    },
+    "sourceInfo": {
+      "__id__": 189
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 84
+    },
+    "targetInfo": {
+      "__id__": 190
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0cYUeEFSBOjYr24f53MgsS"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 84
+    },
+    "sourceInfo": {
+      "__id__": 192
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 84
+    },
+    "targetInfo": {
+      "__id__": 193
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0cYUeEFSBOjYr24f53MgsS"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 94
+    },
+    "sourceInfo": {
+      "__id__": 195
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 94
+    },
+    "targetInfo": {
+      "__id__": 196
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0cYUeEFSBOjYr24f53MgsS"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 111
+    },
+    "sourceInfo": {
+      "__id__": 198
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 111
+    },
+    "targetInfo": {
+      "__id__": 199
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 121
+    },
+    "sourceInfo": {
+      "__id__": 201
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 121
+    },
+    "targetInfo": {
+      "__id__": 202
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 141
+    },
+    "sourceInfo": {
+      "__id__": 204
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 141
+    },
+    "targetInfo": {
+      "__id__": 205
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 131
+    },
+    "sourceInfo": {
+      "__id__": 207
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 131
+    },
+    "targetInfo": {
+      "__id__": 208
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "c5Um6SIiFPpZ2sQvqriRM3"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
+  },
+  {
+    "__type__": "cc.TargetOverrideInfo",
+    "source": {
+      "__id__": 151
+    },
+    "sourceInfo": {
+      "__id__": 210
+    },
+    "propertyPath": [
+      "waters"
+    ],
+    "target": {
+      "__id__": 151
+    },
+    "targetInfo": {
+      "__id__": 211
+    }
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "d26GZskeZLIroi8wdgvr1w"
+    ]
+  },
+  {
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "0bo9EqQYFK2Zyq7BeIp/KB"
+    ]
   }
 ]

+ 1 - 0
assets/module_take_goblet/RoosterTakeGoblet.ts

@@ -60,6 +60,7 @@ export class RoosterTakeGoblet extends Component {
 
     onUpdateLvl() {
         const lbScrews = find('Canvas/GameUI/TitleLvl/LbLvl')!.getComponent(Label);
+
         const { level } = LevelManager.instance.levelModel;
         lbScrews.string = `${level}`;
     }

+ 44 - 4
assets/module_take_goblet/Script/Component/CocktailCup.ts

@@ -1,5 +1,5 @@
-import { _decorator, Component, Enum, Node } from 'cc';
-import { CupHeight } from '../TakeGobletGlobalInstance';
+import { _decorator, Color, Component, Enum, Node, Sprite } from 'cc';
+import { CupHeight, WaterColorHex, WaterColors } from '../TakeGobletGlobalInstance';
 const { ccclass, property, executeInEditMode } = _decorator;
 
 /** 调酒杯组件脚本*/
@@ -7,18 +7,58 @@ const { ccclass, property, executeInEditMode } = _decorator;
 @executeInEditMode
 export class CocktailCup extends Component {
 
+    @property(Sprite)
+    sprite: Sprite = null!
+
     @property({ type: Enum(CupHeight), displayName: '杯高度' })
     cupHeight: CupHeight = CupHeight.Two
 
+    @property({ type: Enum(WaterColors) })
+    private _cupColor: WaterColors = WaterColors.Blue
+
+    @property({ type: Enum(WaterColors) })
+    get cupColor() {
+        return this._cupColor
+    }
+    set cupColor(value) {
+        this._cupColor = value
+        this.changeColor()
+    }
+
     @property(Node)
     waters: Node = null!;  //水节点
 
-    start() {
+    private currentLayers: number = 0;
 
+    onLoad() {
+        // 初始化时隐藏所有水层
+        this.waters.children.forEach(water => water.active = false);
     }
 
-    update(deltaTime: number) {
+    changeColor() {
+        if (!this.sprite) return
+        this.sprite.color = new Color(WaterColorHex[this._cupColor])
+    }
+
+    // 添加水层
+    addLayer() {
+        if (this.currentLayers >= this.cupHeight) return;
+
+        const waterNode = this.waters.children[this.currentLayers];
+        if (waterNode) {
+            waterNode.active = true;
+            this.currentLayers++;
+        }
+    }
+
+    // 清空水层(消除时调用)
+    reset() {
+        this.waters.children.forEach(water => water.active = false);
+        this.currentLayers = 0;
+    }
 
+    isFull(): boolean {
+        return this.currentLayers >= this.cupHeight;
     }
 }
 

+ 0 - 1
assets/module_take_goblet/Script/Component/OriginCup.ts

@@ -2,7 +2,6 @@ import { _decorator, Component, Enum, Node } from 'cc';
 import { CupHeight } from '../TakeGobletGlobalInstance';
 const { ccclass, property, executeInEditMode } = _decorator;
 
-
 /** 原浆酒杯组件脚本*/
 @ccclass('OriginCup')
 @executeInEditMode

+ 29 - 0
assets/module_take_goblet/Script/Component/OutArea.ts

@@ -8,6 +8,11 @@ export class OutArea extends Component {
     @property(Node)
     outNodes: Node = null!;
 
+    // 直接使用outNodes的子节点管理
+    get cups() {
+        return this.outNodes.children;
+    }
+
     start() {
 
     }
@@ -15,6 +20,30 @@ export class OutArea extends Component {
     update(deltaTime: number) {
 
     }
+
+    // 排列杯子
+    arrangeCups() {
+        const startX = 40; //水杯的宽度一半
+        const spacing = 150;
+        this.cups.forEach((cup, index) => {
+            cup.setPosition(startX + index * spacing, 0, 0);
+            console.log('cup position: ', cup.position);
+        });
+    }
+
+    addCup(cup: Node) {
+        cup.setParent(this.outNodes);
+        this.arrangeCups();
+    }
+
+    removeCup(cup: Node) {
+        cup.removeFromParent();
+        this.arrangeCups();
+    }
+
+    getCups() {
+        return this.cups;
+    }
 }
 
 

+ 23 - 14
assets/module_take_goblet/Script/Component/TempCup.ts

@@ -1,14 +1,23 @@
-import { _decorator, Component, Node } from 'cc';
-const { ccclass, property } = _decorator;
-
-@ccclass('TempCup')
-export class TempCup extends Component {
-    start() {
-
-    }
-
-    update(deltaTime: number) {
-        
-    }
-}
-

+import { _decorator, Component, Enum, Node } from 'cc';
+import { CupHeight } from '../TakeGobletGlobalInstance';
+const { ccclass, property } = _decorator;
+
+@ccclass('TempCup')
+export class TempCup extends Component {
+
+    @property({ type: Enum(CupHeight), displayName: '杯高度' })
+    cupHeight: CupHeight = CupHeight.One
+
+    @property(Node)
+    waters: Node = null!;  //水节点
+
+    start() {
+
+    }
+
+    update(deltaTime: number) {
+
+    }
+}
+
+

+ 31 - 1
assets/module_take_goblet/Script/Component/WaitArea.ts

@@ -6,7 +6,12 @@ const { ccclass, property, executeInEditMode } = _decorator;
 export class WaitArea extends Component {
 
     @property(Node)
-    waitNodes: Node = null!;
+    waitNodes: Node = null!;  // 实际存放杯子的节点
+
+    // 直接使用waitNodes的子节点管理
+    get cups() {
+        return this.waitNodes.children;
+    }
 
     start() {
 
@@ -15,6 +20,31 @@ export class WaitArea extends Component {
     update(deltaTime: number) {
 
     }
+
+    // 从右向左排列
+    arrangeCups() {
+        const startX = -40;
+        const spacing = -150;
+
+        this.cups.forEach((cup, index) => {
+            cup.setPosition(startX + index * spacing, 0, 0);
+        });
+
+        // console.log('WaitArea 杯子数量: ', this.cups.length);
+    }
+
+    addCup(cup: Node) {
+        cup.setParent(this.waitNodes);
+        this.arrangeCups();
+    }
+
+    takeCup(): Node | null {
+        if (this.cups.length === 0) return null;
+        const cup = this.cups.pop()!;
+        cup.removeFromParent();
+        this.arrangeCups();
+        return cup;
+    }
 }
 
 

+ 24 - 12
assets/module_take_goblet/Script/Component/Water.ts

@@ -5,27 +5,39 @@ const { ccclass, property, executeInEditMode } = _decorator;
 @ccclass('Water')
 @executeInEditMode
 export class Water extends Component {
+    @property({ type: Enum(WaterColors) })
+    private _color: WaterColors = WaterColors.Blue;
+
     @property(Sprite)
     sprite: Sprite = null!
 
-    @property({ type: Enum(WaterColors) })
-    private _waterColor: WaterColors = WaterColors.Blue
-
-    @property({ type: Enum(WaterColors) })
-    get waterColor() {
-        return this._waterColor
+    get color() {
+        return this._color;
     }
-    set waterColor(value) {
-        this._waterColor = value
-        this.changeColor()
+
+    set color(value: WaterColors) {
+        this._color = value;
+        this.updateColor();
     }
 
     start() {
+        this.updateColor();
+    }
+
+    onLoad() {
+        this.updateColor();
+    }
+
+    private updateColor() {
+        const sprite = this.getComponent(Sprite);
+        if (sprite) {
+            sprite.color = new Color(WaterColorHex[this._color]);
+        }
     }
 
-    changeColor() {
-        if (!this.sprite) return
-        this.sprite.color = new Color(WaterColorHex[this._waterColor])
+    // 外部调用设置颜色
+    public setColor(color: WaterColors) {
+        this.color = color;
     }
 }
 

+ 52 - 1
assets/module_take_goblet/Script/LevelAction.ts

@@ -1,15 +1,66 @@
-import { _decorator, BoxCollider2D, Button, CircleCollider2D, Collider2D, Component, find, Node, NodeEventType } from 'cc';
+import { _decorator, BoxCollider2D, Button, CircleCollider2D, Collider2D, Component, find, instantiate, Node, NodeEventType, view } from 'cc';
+import { resLoader, ResLoader } from '../../core_tgx/base/ResLoader';
+import { CupHeight, TakeGobletGlobalInstance, WaterColors } from './TakeGobletGlobalInstance';
+import { OutArea } from './Component/OutArea';
+import { WaitArea } from './Component/WaitArea';
+import { CocktailCup } from './Component/CocktailCup';
 const { ccclass, property } = _decorator;
 
 @ccclass('LevelAction')
 export class LevelAction extends Component {
 
+    @property(OutArea)
+    outArea: OutArea = null!;  // 直接引用OutArea组件
+
+    @property(WaitArea)
+    waitArea: WaitArea = null!;  // 直接引用WaitArea组件
+
+    @property(Node)
+    tempCups: Node = null!;  //临时杯
+
+    @property(Node)
+    goblets: Node = null!;  //原浆区
+
     start() {
         this.registerListener();
+        this.generateInitialCups(); // 自动初始化
     }
 
     registerListener() {
     }
 
+    private async generateInitialCups() {
+        const instance = TakeGobletGlobalInstance.instance;
+        const configs = instance.getInitialCupsConfig();
+
+        const allCups: Node[] = [];
+        for (const config of configs) {
+            for (let i = 0; i < config.count; i++) {
+                const prefab = await instance.loadAsyncCocktail(config.height);
+                const cupNode = instantiate(prefab);
+                const cup = cupNode.getComponent(CocktailCup)!;
+
+                // 设置颜色并重置水位
+                cup.cupColor = instance.getRandomColor();
+                cup.reset();
+                allCups.push(cupNode);
+            }
+        }
+
+        console.log('allCups: ', allCups.length);
+        // 分配初始位置
+        allCups.slice(0, 2).forEach(cup => this.outArea.addCup(cup));
+        allCups.slice(2).forEach(cup => this.waitArea.addCup(cup));
+    }
+
+    // 当调酒区杯子被消除时调用
+    public async handleCupsRemoved(count: number) {
+        for (let i = 0; i < count; i++) {
+            const cup = this.waitArea.takeCup();
+            if (cup) {
+                this.outArea.addCup(cup);
+            }
+        }
+    }
 }
 

+ 3 - 3
assets/module_take_goblet/Script/Manager/LevelMgr.ts

@@ -6,6 +6,8 @@ import { GameEvent } from '../Enum/GameEvent';
 import { LevelAction } from '../LevelAction';
 import { LevelModel } from '../Model/LevelModel';
 import { GameUtil } from '../GameUtil';
+import { TakeGobletGlobalInstance, WaterColors } from '../TakeGobletGlobalInstance';
+import { CocktailCup } from '../Component/CocktailCup';
 const { ccclass, property } = _decorator;
 
 @ccclass('LevelManager')
@@ -19,6 +21,7 @@ export class LevelManager {
     public levelModel: LevelModel = null;
     currentLevel: Node = null!;
     randomLevel: number = 0;
+    currentCups: CocktailCup[] = [];
 
     initilizeModel(): void {
         this.levelModel = new LevelModel();
@@ -71,9 +74,6 @@ export class LevelManager {
     public async gameStart() {
         const { level } = this.levelModel;
         await this.loadLevel(level);
-
-        await GameUtil.delay(0.2);
-        EventDispatcher.instance.emit(GameEvent.EVENT_UPDATE_LEFT_NAIL);
     }
 
     /** 清除关卡数据*/

+ 27 - 8
assets/module_take_goblet/Script/TakeGobletGlobalInstance.ts

@@ -5,7 +5,7 @@ import { ResourcePool } from './ResourcePool';
 const { ccclass, property } = _decorator;
 
 @ccclass('TakeGobletGlobalInstance')
-export class TakeGobletGlobalInstance extends Component {
+export class TakeGobletGlobalInstance {
     private static _instance: TakeGobletGlobalInstance;
     public static get instance() {
         if (this._instance) {
@@ -16,12 +16,8 @@ export class TakeGobletGlobalInstance extends Component {
         return this._instance;
     }
 
-    async loadPinPrefab() {
-        const prefab = await this.loadAsyncPin();
-        ResourcePool.instance.set_prefab(prefab.name, prefab);
-    }
-
-    async loadAsyncPin(): Promise<Prefab> {
+    /** 异步加载调酒杯预设*/
+    async loadAsyncCocktail(height: CupHeight): Promise<Prefab> {
         return new Promise((resolve, reject) => {
             const bundle = assetManager.getBundle(resLoader.gameBundleName);
             if (!bundle) {
@@ -29,13 +25,35 @@ export class TakeGobletGlobalInstance extends Component {
                 reject();
             }
 
-            resLoader.loadAsync(resLoader.gameBundleName, `Prefabs/pin`, Prefab).then((prefab: Prefab) => {
+            let numStr = 'Two';
+            if (height == CupHeight.Three) {
+                numStr = 'Three';
+            } else if (height == CupHeight.Four) {
+                numStr = 'Four';
+            }
+
+            resLoader.loadAsync(resLoader.gameBundleName, `Prefabs/Cup/Cocktail/Cocktail${numStr}`, Prefab).then((prefab: Prefab) => {
                 resolve(prefab);
             })
         })
     }
 
     public levels: Node = null;
+
+    // 初始化调酒杯配置
+    getInitialCupsConfig(): { height: CupHeight; count: number }[] {
+        return [
+            { height: CupHeight.Two, count: 3 },
+            { height: CupHeight.Three, count: 5 },
+            { height: CupHeight.Four, count: 7 }
+        ];
+    }
+
+    // 生成随机颜色数组
+    public getRandomColor(): WaterColors {
+        const colors = Object.values(WaterColors).filter(v => !isNaN(Number(v))) as WaterColors[];
+        return colors[Math.floor(Math.random() * colors.length)];
+    }
 }
 
 /**道具类型
@@ -76,6 +94,7 @@ export const WaterColorHex: Record<WaterColors, string> = {
 
 /**杯子高度*/
 export enum CupHeight {
+    One = 1,
     Two = 2,
     Three = 3,
     Four = 4,

+ 3 - 0
assets/start/Start.ts

@@ -19,6 +19,9 @@ const _preloadRes = [
     { bundle: ModuleDef.BASIC, url: 'ui_waiting/UI_Waiting', type: 'prefab' },
     { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Prefabs/UI/Result/UI_BattleResult', type: 'prefab' },
     { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Prefabs/Levels/lvl_1', type: 'prefab' },
+    { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Prefabs/Cup/Cocktail/CocktailFour', type: 'prefab' },
+    { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Prefabs/Cup/Cocktail/CocktailThree', type: 'prefab' },
+    { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Prefabs/Cup/Cocktail/CocktailTwo', type: 'prefab' },
     { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Audio/bgm_1.mp3', type: 'audio' },
     { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Audio/bgm_2.mp3', type: 'audio' },
     { bundle: ModuleDef.MODULE_TAKE_GOBLET, url: 'Audio/dianji.mp3', type: 'audio' },