kaka пре 4 година
родитељ
комит
443792b540

+ 46 - 10
assets/resources/animation/animals/30003_0.anim

@@ -3,8 +3,8 @@
   "_name": "30003_0",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 0.8333333333333334,
-  "sample": 6,
+  "_duration": 1.1,
+  "sample": 10,
   "speed": 1,
   "wrapMode": 2,
   "curveData": {
@@ -14,31 +14,67 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "34bba454-cdd6-467a-a48f-4b2d1f95698f@6c48a"
+              "__uuid__": "df453f40-5c77-431c-b464-c87ed8864534@6c48a"
             }
           },
           {
-            "frame": 0.16666666666666666,
+            "frame": 0.1,
             "value": {
-              "__uuid__": "451a1cc8-cdfc-477c-9373-903f64a14b4c@6c48a"
+              "__uuid__": "3323e526-5b1a-4572-a04d-69a82af22ba6@6c48a"
             }
           },
           {
-            "frame": 0.3333333333333333,
+            "frame": 0.2,
             "value": {
-              "__uuid__": "21396373-cdb5-4ac4-b4b0-d55afc63e922@6c48a"
+              "__uuid__": "17f56a48-40eb-4238-aca2-477bc10fa140@6c48a"
+            }
+          },
+          {
+            "frame": 0.3,
+            "value": {
+              "__uuid__": "85abbd6c-d44c-4417-9be7-3c2b6b141003@6c48a"
+            }
+          },
+          {
+            "frame": 0.4,
+            "value": {
+              "__uuid__": "41e41822-5c82-43ed-9bc1-95b7b42b0f79@6c48a"
             }
           },
           {
             "frame": 0.5,
             "value": {
-              "__uuid__": "04d53e45-1269-4c52-8b8f-f870143219af@6c48a"
+              "__uuid__": "9a3f8380-d5eb-4ea2-abf0-0286e2fbc166@6c48a"
+            }
+          },
+          {
+            "frame": 0.6,
+            "value": {
+              "__uuid__": "5d98143a-6143-4c3d-b58a-8cebf8b6cec9@6c48a"
+            }
+          },
+          {
+            "frame": 0.7,
+            "value": {
+              "__uuid__": "42ebc6f8-70d8-446f-a24e-a96d5827a573@6c48a"
+            }
+          },
+          {
+            "frame": 0.8,
+            "value": {
+              "__uuid__": "0d7ee052-867f-45f7-b108-815b8b799eb9@6c48a"
+            }
+          },
+          {
+            "frame": 0.9,
+            "value": {
+              "__uuid__": "2299d618-f304-4035-9d26-ee464d1fb4f2@6c48a"
             }
           },
           {
-            "frame": 0.6666666666666666,
+            "frame": 1,
             "value": {
-              "__uuid__": "b2f23d44-6240-42d3-a95b-ef71f3113df7@6c48a"
+              "__uuid__": "3f30d1c4-7bc9-48e9-ab50-0499187faf7a@6c48a"
             }
           }
         ]

+ 1 - 1
assets/resources/animation/animals/30003_0.anim.meta

@@ -1,5 +1,5 @@
 {
   "ver": "2.1.0",
-  "uuid": "c11d579c-b5d2-48c6-ae35-316c1f897a91",
+  "uuid": "ba9760b5-449c-42af-be12-17afb4d99dde",
   "subMetas": {}
 }

+ 46 - 22
assets/resources/animation/animals/30003_1.anim

@@ -1,10 +1,10 @@
 {
   "__type__": "cc.AnimationClip",
-  "_name": "30002_0",
+  "_name": "30003_1",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 1.8333333333333333,
-  "sample": 6,
+  "_duration": 1.5,
+  "sample": 10,
   "speed": 1,
   "wrapMode": 2,
   "curveData": {
@@ -14,67 +14,91 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "dcba9df1-05a1-4748-8294-0413a5362ee0@6c48a"
+              "__uuid__": "61a1556e-32a7-4d56-a6b1-5b1d0bda222c@6c48a"
             }
           },
           {
-            "frame": 0.16666666666666666,
+            "frame": 0.1,
             "value": {
-              "__uuid__": "e2bac86a-cfd8-40a6-aaa5-08589384f674@6c48a"
+              "__uuid__": "d00d50f0-c872-4dcc-b7cb-4642b3c22c6b@6c48a"
             }
           },
           {
-            "frame": 0.3333333333333333,
+            "frame": 0.2,
             "value": {
-              "__uuid__": "d7bcd950-ea00-4be1-9bd3-ee60743854da@6c48a"
+              "__uuid__": "ad4f6ffc-0f03-476b-8c4a-7eba9d0691de@6c48a"
+            }
+          },
+          {
+            "frame": 0.3,
+            "value": {
+              "__uuid__": "5a7cd1c4-a16c-4a66-94e7-0894e54fc191@6c48a"
+            }
+          },
+          {
+            "frame": 0.4,
+            "value": {
+              "__uuid__": "36ae6769-f4f8-4b0a-8e43-97fc6a91e6cc@6c48a"
             }
           },
           {
             "frame": 0.5,
             "value": {
-              "__uuid__": "8a7cad4c-0497-4521-ad77-927950a80e9d@6c48a"
+              "__uuid__": "bef9acde-5c3c-4d5d-8103-7eab0de96625@6c48a"
+            }
+          },
+          {
+            "frame": 0.6,
+            "value": {
+              "__uuid__": "a210e1f8-dec9-412b-bf17-7bb00f6970b9@6c48a"
+            }
+          },
+          {
+            "frame": 0.7,
+            "value": {
+              "__uuid__": "0f06b5cf-8f88-4ae7-9a0b-570bf13db279@6c48a"
             }
           },
           {
-            "frame": 0.6666666666666666,
+            "frame": 0.8,
             "value": {
-              "__uuid__": "0105edf5-75a1-46f2-a008-148e4f338eab@6c48a"
+              "__uuid__": "f1651eaf-3c80-4fa8-844b-f464b26b40a2@6c48a"
             }
           },
           {
-            "frame": 0.8333333333333334,
+            "frame": 0.9,
             "value": {
-              "__uuid__": "288ed40f-8e11-4131-a424-fdeaa91c9474@6c48a"
+              "__uuid__": "e04a1212-60c2-43c2-a2c7-31f5bab40345@6c48a"
             }
           },
           {
             "frame": 1,
             "value": {
-              "__uuid__": "e4346a63-8afc-416f-bf05-cc41e3ece5e8@6c48a"
+              "__uuid__": "8b494098-1119-4141-9733-bc3218988d40@6c48a"
             }
           },
           {
-            "frame": 1.1666666666666667,
+            "frame": 1.1,
             "value": {
-              "__uuid__": "5b75f67f-7526-4df1-9346-707fc3cba9a6@6c48a"
+              "__uuid__": "98c7cd9c-ebe2-46a0-90c4-82b8ce594c6c@6c48a"
             }
           },
           {
-            "frame": 1.3333333333333333,
+            "frame": 1.2,
             "value": {
-              "__uuid__": "91178ada-b582-47d2-9aa6-940ed26e0263@6c48a"
+              "__uuid__": "28d0ee0e-5eb2-491f-8e44-36561f8bd8a3@6c48a"
             }
           },
           {
-            "frame": 1.5,
+            "frame": 1.3,
             "value": {
-              "__uuid__": "de2033f9-0773-4848-8b3b-a4a4df3b4d3c@6c48a"
+              "__uuid__": "de06a84c-d26b-480e-9053-321d68adb3a0@6c48a"
             }
           },
           {
-            "frame": 1.6666666666666667,
+            "frame": 1.4,
             "value": {
-              "__uuid__": "e529fa0e-a364-4c9f-8b7e-0f81e403bf2c@6c48a"
+              "__uuid__": "ba133d42-e930-41b4-aab2-1cd0dfc5d58f@6c48a"
             }
           }
         ]

+ 1 - 1
assets/resources/animation/animals/30003_1.anim.meta

@@ -1,5 +1,5 @@
 {
   "ver": "2.1.0",
-  "uuid": "be532158-fe50-4961-a93a-9cb4034e9873",
+  "uuid": "257cd8c5-f4c2-4491-9996-bbaa083c31f0",
   "subMetas": {}
 }

+ 12 - 48
assets/resources/animation/animals/30003_2.anim

@@ -1,10 +1,10 @@
 {
   "__type__": "cc.AnimationClip",
-  "_name": "30002_0",
+  "_name": "30003_2",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 1.8333333333333333,
-  "sample": 6,
+  "_duration": 0.5,
+  "sample": 10,
   "speed": 1,
   "wrapMode": 2,
   "curveData": {
@@ -14,67 +14,31 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "dcba9df1-05a1-4748-8294-0413a5362ee0@6c48a"
+              "__uuid__": "b2f23d44-6240-42d3-a95b-ef71f3113df7@6c48a"
             }
           },
           {
-            "frame": 0.16666666666666666,
+            "frame": 0.1,
             "value": {
-              "__uuid__": "e2bac86a-cfd8-40a6-aaa5-08589384f674@6c48a"
+              "__uuid__": "04d53e45-1269-4c52-8b8f-f870143219af@6c48a"
             }
           },
           {
-            "frame": 0.3333333333333333,
+            "frame": 0.2,
             "value": {
-              "__uuid__": "d7bcd950-ea00-4be1-9bd3-ee60743854da@6c48a"
+              "__uuid__": "21396373-cdb5-4ac4-b4b0-d55afc63e922@6c48a"
             }
           },
           {
-            "frame": 0.5,
+            "frame": 0.3,
             "value": {
-              "__uuid__": "8a7cad4c-0497-4521-ad77-927950a80e9d@6c48a"
+              "__uuid__": "451a1cc8-cdfc-477c-9373-903f64a14b4c@6c48a"
             }
           },
           {
-            "frame": 0.6666666666666666,
+            "frame": 0.4,
             "value": {
-              "__uuid__": "0105edf5-75a1-46f2-a008-148e4f338eab@6c48a"
-            }
-          },
-          {
-            "frame": 0.8333333333333334,
-            "value": {
-              "__uuid__": "288ed40f-8e11-4131-a424-fdeaa91c9474@6c48a"
-            }
-          },
-          {
-            "frame": 1,
-            "value": {
-              "__uuid__": "e4346a63-8afc-416f-bf05-cc41e3ece5e8@6c48a"
-            }
-          },
-          {
-            "frame": 1.1666666666666667,
-            "value": {
-              "__uuid__": "5b75f67f-7526-4df1-9346-707fc3cba9a6@6c48a"
-            }
-          },
-          {
-            "frame": 1.3333333333333333,
-            "value": {
-              "__uuid__": "91178ada-b582-47d2-9aa6-940ed26e0263@6c48a"
-            }
-          },
-          {
-            "frame": 1.5,
-            "value": {
-              "__uuid__": "de2033f9-0773-4848-8b3b-a4a4df3b4d3c@6c48a"
-            }
-          },
-          {
-            "frame": 1.6666666666666667,
-            "value": {
-              "__uuid__": "e529fa0e-a364-4c9f-8b7e-0f81e403bf2c@6c48a"
+              "__uuid__": "34bba454-cdd6-467a-a48f-4b2d1f95698f@6c48a"
             }
           }
         ]

+ 1 - 1
assets/resources/animation/animals/30003_2.anim.meta

@@ -1,5 +1,5 @@
 {
   "ver": "2.1.0",
-  "uuid": "2c9fcb1b-fe21-45ae-a6fd-7d2bc9922356",
+  "uuid": "5d73ec7c-37fe-4b71-8c91-d800edbd07f8",
   "subMetas": {}
 }

+ 19 - 2
assets/resources/game/prefab/paster_30002.prefab

@@ -25,9 +25,13 @@
       }
     ],
     "_active": true,
-    "_components": [],
+    "_components": [
+      {
+        "__id__": 9
+      }
+    ],
     "_prefab": {
-      "__id__": 9
+      "__id__": 10
     },
     "_opacity": 255,
     "_color": {
@@ -317,6 +321,19 @@
     "sync": false
   },
   {
+    "__type__": "8b664EVaIhJho5nWrO6vh6z",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "ani": {
+      "__id__": 7
+    },
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 23 - 6
assets/resources/game/prefab/paster_30003.prefab

@@ -25,9 +25,13 @@
       }
     ],
     "_active": true,
-    "_components": [],
+    "_components": [
+      {
+        "__id__": 9
+      }
+    ],
     "_prefab": {
-      "__id__": 9
+      "__id__": 10
     },
     "_opacity": 255,
     "_color": {
@@ -291,17 +295,17 @@
     },
     "_enabled": true,
     "_defaultClip": {
-      "__uuid__": "2c9fcb1b-fe21-45ae-a6fd-7d2bc9922356"
+      "__uuid__": "5d73ec7c-37fe-4b71-8c91-d800edbd07f8"
     },
     "_clips": [
       {
-        "__uuid__": "c11d579c-b5d2-48c6-ae35-316c1f897a91"
+        "__uuid__": "ba9760b5-449c-42af-be12-17afb4d99dde"
       },
       {
-        "__uuid__": "be532158-fe50-4961-a93a-9cb4034e9873"
+        "__uuid__": "257cd8c5-f4c2-4491-9996-bbaa083c31f0"
       },
       {
-        "__uuid__": "2c9fcb1b-fe21-45ae-a6fd-7d2bc9922356"
+        "__uuid__": "5d73ec7c-37fe-4b71-8c91-d800edbd07f8"
       }
     ],
     "playOnLoad": false,
@@ -319,6 +323,19 @@
     "sync": false
   },
   {
+    "__type__": "8b664EVaIhJho5nWrO6vh6z",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "ani": {
+      "__id__": 7
+    },
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

Разлика између датотеке није приказан због своје велике величине
+ 222 - 133
assets/resources/module/setting/setting.prefab


+ 21 - 278
assets/scene/MainScene.fire

@@ -78,28 +78,28 @@
         "__id__": 6
       },
       {
-        "__id__": 14
+        "__id__": 9
       },
       {
-        "__id__": 16
+        "__id__": 11
       },
       {
-        "__id__": 18
+        "__id__": 13
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 22
+        "__id__": 17
       },
       {
-        "__id__": 23
+        "__id__": 18
       },
       {
-        "__id__": 24
+        "__id__": 19
       },
       {
-        "__id__": 25
+        "__id__": 20
       }
     ],
     "_prefab": null,
@@ -313,18 +313,14 @@
     "_parent": {
       "__id__": 2
     },
-    "_children": [
-      {
-        "__id__": 7
-      }
-    ],
+    "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 12
+        "__id__": 7
       },
       {
-        "__id__": 13
+        "__id__": 8
       }
     ],
     "_prefab": null,
@@ -376,259 +372,6 @@
     "_id": "feed4Ygc5Mh52Eu+0uixiP"
   },
   {
-    "__type__": "cc.Node",
-    "_name": "paster_30001",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 6
-    },
-    "_children": [
-      {
-        "__id__": 8
-      },
-      {
-        "__id__": 10
-      }
-    ],
-    "_active": true,
-    "_components": [],
-    "_prefab": null,
-    "_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,
-        0.3,
-        0.3,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": "95bEIR3pNPN6rXk+YsOAu8"
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "farmerMask",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 7
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 9
-      }
-    ],
-    "_prefab": null,
-    "_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,
-        -52,
-        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": "7fwwJJ2mlMaadzgDo5P7CF"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 8
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "ddb55447-8036-4206-9686-c6da7ee9f501@6c48a"
-    },
-    "_type": 0,
-    "_sizeMode": 1,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": "d9Dm5wq61Cz5AU+camuzO+"
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "30001_0_1",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 7
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 11
-      }
-    ],
-    "_prefab": null,
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 126,
-      "height": 146
-    },
-    "_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": "68E94elA5GJo0w5gbd5lb8"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 10
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "758ccc30-fbca-4563-861a-ab2af3532a1a@6c48a"
-    },
-    "_type": 0,
-    "_sizeMode": 1,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": "43WD1WoStGcqWa+aVz8cC0"
-  },
-  {
     "__type__": "d0ea1+IO0BKJoZMInS6d9dy",
     "_name": "",
     "_objFlags": 0,
@@ -676,7 +419,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 15
+        "__id__": 10
       }
     ],
     "_prefab": null,
@@ -732,7 +475,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 9
     },
     "_enabled": true,
     "tween_time": 1,
@@ -769,7 +512,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 17
+        "__id__": 12
       }
     ],
     "_prefab": null,
@@ -825,7 +568,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 16
+      "__id__": 11
     },
     "_enabled": true,
     "_id": "d7Krs4ut1FS6lgpB36rsTx"
@@ -839,13 +582,13 @@
     },
     "_children": [
       {
-        "__id__": 19
+        "__id__": 14
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 21
+        "__id__": 16
       }
     ],
     "_prefab": null,
@@ -900,10 +643,10 @@
     "__type__": "cc.Node",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 18
+      "__id__": 13
     },
     "_prefab": {
-      "__id__": 20
+      "__id__": 15
     },
     "_name": "GuideWeak",
     "_active": true,
@@ -934,7 +677,7 @@
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 19
+      "__id__": 14
     },
     "asset": {
       "__uuid__": "ba2e33b2-5a64-424b-8b08-247fed4be0f0"
@@ -947,7 +690,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 18
+      "__id__": 13
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1022,7 +765,7 @@
     },
     "_enabled": true,
     "node_guide": {
-      "__id__": 18
+      "__id__": 13
     },
     "_id": "6fbJRZsUhE4p90rFOw/XX3"
   },

+ 13 - 6
assets/script/before/main/PastureData.ts

@@ -2,28 +2,35 @@
 
 import Util from "../util/Util";
 
-const { ccclass, property } = cc._decorator;
+const { ccclass } = cc._decorator;
 
 @ccclass
 export default class PastureData {
     /** 所有点字典 */
-    public pointMap: Map<number, cc.Vec2> = new Map<number, cc.Vec2>();
+    private pointMap: Map<number, cc.Vec2> = new Map<number, cc.Vec2>();
     /** 可移动key数组 */
-    public canMoveArr: Array<number> = new Array<number>();
+    private canMoveArr: Array<number> = new Array<number>();
 
     /** 不可移动key数组 */
-    public noCanMoveArr: Array<number> = new Array<number>();
+    private noCanMoveArr: Array<number> = new Array<number>();
 
     setPointMap(index, point: cc.Vec2) {
         this.pointMap.set(index, point);
         this.setCanMove(index);
     }
 
-    getCanMovePoint() {
+    getCanMoveIndex(oldIndex = -1) {
         let len = this.canMoveArr.length;
         let i = Util.rnd(0, len - 1);
         let index = this.canMoveArr[i];
-        this.setCanMove(index);
+        this.setNoCanMove(index);
+        if (oldIndex != -1) {
+            this.setCanMove(oldIndex);
+        }
+        return index;
+    }
+
+    getCanMoveIndexPoint(index) {
         let point = this.pointMap.get(index);
         return point;
     }

+ 12 - 10
assets/script/before/main/PastureIcon.ts

@@ -42,15 +42,14 @@ export default class PastureIcon extends cc.Component {
         for (var i = 0; i < 5; i++) {
             let prefab = await mk.loader.load("game/prefab/paster_" + this.configID, cc.Prefab);
             let animal = cc.instantiate(prefab);
-            animal.setPosition(gData.pastureData.getCanMovePoint());
-            this.animalsArr.push(animal.getComponent(Animals));
+            let animais = animal.getComponent(Animals);
+            this.animalsArr.push(animais);
+            animais.pointIndex = gData.pastureData.getCanMoveIndex();
+            animal.setPosition(gData.pastureData.getCanMoveIndexPoint(animais.pointIndex));
             animal.parent = this.points.parent;
         }
-    }
 
-    start() {
         this.freshState();
-
     }
 
     update() {
@@ -69,36 +68,39 @@ export default class PastureIcon extends cc.Component {
     private setState(value: PastureState): void {
         if (this.state != value) {
             this._state = value;
-            this.points.parent.active = false;
+            // this.points.parent.active = false;
             this.eatNode.active = false;
             this.countDown.node.active = false;
 
             switch (this.state) {
                 case PastureState.Lock:
+                    for (var i = 0; i < this.animalsArr.length; i++) {
+                        this.animalsArr[i].setState(AnimalState.Wait, this.configID);
+                    }
                     break;
                 case PastureState.Empty:
                     for (var i = 0; i < this.animalsArr.length; i++) {
-                        this.animalsArr[i].setState(AnimalState.Hanger);
+                        this.animalsArr[i].setState(AnimalState.Hanger, this.configID);
                     }
                     break;
                 case PastureState.Growing:
                     this.countDown.node.active = true;
                     for (var i = 0; i < this.animalsArr.length; i++) {
-                        this.animalsArr[i].setState(AnimalState.Eat);
+                        this.animalsArr[i].setState(AnimalState.Eat, this.configID);
                     }
                     break;
                 case PastureState.Ripe:
                     this.countDown.node.active = true;
                     this.countDown.setState(1);
                     for (var i = 0; i < this.animalsArr.length; i++) {
-                        this.animalsArr[i].setState(AnimalState.Wait);
+                        this.animalsArr[i].setState(AnimalState.Wait, this.configID);
                     }
                     break;
                 case PastureState.Sick:
                     this.countDown.node.active = true;
                     this.countDown.setState(0);
                     for (var i = 0; i < this.animalsArr.length; i++) {
-                        this.animalsArr[i].setState(AnimalState.Wait);
+                        this.animalsArr[i].setState(AnimalState.Wait, this.configID);
                     }
                     break;
             }

+ 31 - 18
assets/script/before/view/Animals.ts

@@ -11,61 +11,74 @@ export default class Animals extends cc.Component {
     ani: cc.Animation = null;
 
     clipArr: Array<cc.AnimationClip> = new Array<cc.AnimationClip>();
-    private _state: AnimalState = AnimalState.Wait;
+    private _state: AnimalState = -1;
 
-    curTargetPoint = null;
-    speed = 1;
+    configID = 0;
+    curTargetPoint: cc.Vec2 = null;
+    angle = null;
+    speed = 0.5;
     walkTotleFarme = 0;
     isWalk = false;
+    pointIndex = -1;
 
     start() {
-        this.clipArr = this.ani.getClips();
         this.curTargetPoint = this.node.getPosition();
         this.getNextPoint();
     }
 
-    setState(state) {
+    setState(state, configID) {
+        this.configID = configID;
         if (this._state == state) {
             return;
         }
         this._state = state;
+        let clipName = ''
         switch (this._state) {
             case AnimalState.Hanger:
-                this.ani.defaultClip = this.ani[0];
+                clipName = this.configID + '_' + 0;
                 break;
             case AnimalState.Eat:
-                this.ani.defaultClip = this.ani[2];
+                clipName = this.configID + '_' + 2;
                 break;
             case AnimalState.Wait:
-                this.ani.defaultClip = this.ani[0];
+                clipName = this.configID + '_' + 1;
                 break;
         }
-        this.ani.play()
+        this.ani.play(clipName);
     }
 
     getNextPoint() {
         let ran = Math.random() * 2 + 3;
         this.scheduleOnce(() => {
-            this.curTargetPoint = gData.pastureData.getCanMovePoint();
-            let distance = cc.Vec2.distance(this.node.position, this.curTargetPoint);
+            this.pointIndex = gData.pastureData.getCanMoveIndex(this.pointIndex);
+            this.curTargetPoint = gData.pastureData.getCanMoveIndexPoint(this.pointIndex);
+            let distance = this.node.getPosition().sub(this.curTargetPoint).mag();
+            this.angle = Math.atan2(this.curTargetPoint.y - this.node.position.y, this.curTargetPoint.x - this.node.position.x);
             this.walkTotleFarme = distance / this.speed;
-            this.ani.defaultClip = this.ani[1];
-            this.ani.play()
+            let clipName = this.configID + '_' + 1;
+            this.node.angle = this.angle;
+            if (this.curTargetPoint.x > this.node.position.x) {
+                this.node.scaleX = -0.3;
+            }
+            else {
+                this.node.scaleX = 0.3;
+            }
+            this.ani.play(clipName);
             this.isWalk = true;
         }, ran)
     }
 
     update(dt) {
         if (this.isWalk) {
-            let angle = Math.atan2(this.curTargetPoint.y - this.node.position.y, this.curTargetPoint.x - this.node.position.x);
-            let x = Math.cos(angle) * this.speed;
-            let y = Math.sin(angle) * this.speed;
-            this.node.setPosition(cc.v2(x, y));
+            let x = Math.cos(this.angle) * this.speed;
+            let y = Math.sin(this.angle) * this.speed;
+            this.node.setPosition(this.node.getPosition().add(cc.v2(x, y)));
             this.walkTotleFarme--;
             if (this.walkTotleFarme <= 0) {
                 this.isWalk = false;
                 this.node.setPosition(this.curTargetPoint);
-                this.setState(this._state);
+                this.setState(this._state, this.configID);
+                this.getNextPoint();
             }
         }
     }

+ 1 - 1
assets/script/before/view/ProductShow.ts

@@ -11,6 +11,6 @@ export default class ProductShow extends cc.Component {
         this.load();
     }
     public async load() {
-        this.productSprite.spriteFrame = await mk.loader.load("factory_icons/factory_" + this.id + "/spriteFrame", cc.SpriteFrame);
+        this.productSprite.spriteFrame = await mk.loader.load("game/coregame/texture/factory_icons/factory_" + this.id, cc.SpriteFrame);
     }
 }

+ 2 - 2
assets/script/game/data/module/BlessingBagData.ts

@@ -65,7 +65,7 @@ export class BlessingBagData extends Data {
         * @param cb 提现回调
        */
     async addProgress() {
-        let data = {"updateType": this.videoRbData.isVideo};
+        let data = { "updateType": this.videoRbData.isVideo };
         let response = await mk.http.sendData('/welFare/updateWelFareTask', data);
 
         if (response.errcode != 0) {
@@ -101,7 +101,7 @@ export class BlessingBagData extends Data {
     async HttpCashTask() {
         let data = { Id: this.taskRbId };
         let response = await mk.http.sendData('welFare/welFareCash', data);
-
+        mk.console.logSingle("'welFare/welFareCash", response.data);
         if (response.errcode != 0) {
             return null;
         }

+ 9 - 11
assets/script/game/module/setting/Setting.ts

@@ -25,11 +25,11 @@ export default class Setting extends cc.Component {
     lbl_version: cc.Label = null;
     @property({ type: cc.Label, displayName: "成就名称" })
     lbl_achieve: cc.Label = null;
-    @property({type: cc.Label, displayName: '等级'})
+    @property({ type: cc.Label, displayName: '等级' })
     lbl_lv: cc.Label = null;
-    @property({type: cc.Label, displayName: '红包币'})
+    @property({ type: cc.Label, displayName: '红包币' })
     lbl_redBagCoin: cc.Label = null;
-    @property({type: cc.Label, displayName: '提现金额'})
+    @property({ type: cc.Label, displayName: '提现金额' })
     lbl_value: cc.Label = null;
 
     node_rule: cc.Node = null;
@@ -39,15 +39,15 @@ export default class Setting extends cc.Component {
     }
 
     start() {
-        mk.ad.showNative(4);     
+        mk.ad.showNative(4);
     }
 
     private async initData() {
         console.log("=== gData.wechatData.unionid", gData.wechatData.unionid);
         console.log("=== gData.wechatData.nickName", gData.wechatData.nickName);
         this.lbl_id.string = "ID:" + mk.string.getNewLimitStr(gData.wechatData.unionid, 10);// 14 
-        //this.lbl_nickname.string = gData.wechatData.nickName;
-        this.lbl_version.string = gData.appData.appVersion;
+        this.lbl_nickname.string = gData.wechatData.nickName;
+        // this.lbl_version.string = gData.appData.appVersion;
 
         let music = "module/setting/texture/" + (mk.audio.getSwitchMusic() ? "on" : "off");
         let effect = "module/setting/texture/" + (mk.audio.getSwitchEffect() ? "on" : "off");
@@ -60,20 +60,18 @@ export default class Setting extends cc.Component {
         console.log("=== loadHead:", result);
 
         // this.img_head.spriteFrame = result;
-        
+
         this.lbl_lv.string = 'Lv:' + gData.gameData.gameData.gradeLevel.toString();
         this.lbl_redBagCoin.string = gData.gameData.gameData.redMoney.toString();
 
         const cash_bar = gData.redBagCash.cash_bar;
         let cash_data = gData.redBagCash.getItemDataByIndex(cash_bar);
-        if(cash_data)
-        {
+        if (cash_data) {
             this.lbl_value.string = (cash_data.money / 100).toString();
         };
     }
 
-    private clickInviteBtn()
-    {
+    private clickInviteBtn() {
         mk.audio.playEffect("button");
     }
 

Разлика између датотеке није приказан због своје велике величине
+ 568 - 136
build/jsb-link/js backups (useful for debugging)/main.index.js


+ 2 - 2
packages-hot-update/cfg.json

@@ -8,7 +8,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/"
     ],
-    "buildTime": 1629713809694,
-    "genTime": 1629713809694,
+    "buildTime": 1629793247680,
+    "genTime": 1629793247680,
     "genVersion": null
 }

Неке датотеке нису приказане због велике количине промена