wuwangdong 4 лет назад
Родитель
Сommit
d135508af4
52 измененных файлов с 2003 добавлено и 1383 удалено
  1. 42 6
      assets/resources/animation/animals/30001_0.anim
  2. 43 13
      assets/resources/animation/animals/30001_1.anim
  3. 7 43
      assets/resources/animation/animals/30001_2.anim
  4. 42 6
      assets/resources/animation/animals/30002_0.anim
  5. 37 13
      assets/resources/animation/animals/30002_1.anim
  6. 7 43
      assets/resources/animation/animals/30002_2.anim
  7. 46 10
      assets/resources/animation/animals/30003_0.anim
  8. 1 1
      assets/resources/animation/animals/30003_0.anim.meta
  9. 46 22
      assets/resources/animation/animals/30003_1.anim
  10. 1 1
      assets/resources/animation/animals/30003_1.anim.meta
  11. 12 48
      assets/resources/animation/animals/30003_2.anim
  12. 1 1
      assets/resources/animation/animals/30003_2.anim.meta
  13. 149 214
      assets/resources/game/coregame/coregame.prefab
  14. BIN
      assets/resources/game/coregame/texture/pasture/factory_clock.png
  15. 36 0
      assets/resources/game/coregame/texture/pasture/factory_clock.png.meta
  16. 3 1
      assets/resources/game/prefab/paster_30001.prefab
  17. 22 3
      assets/resources/game/prefab/paster_30002.prefab
  18. 23 6
      assets/resources/game/prefab/paster_30003.prefab
  19. 45 45
      assets/resources/game/prefab/uiItem/PlantItem.prefab
  20. 23 14
      assets/resources/game/prefab/uiPanel/ADClearSickPanel.prefab
  21. 166 31
      assets/resources/game/prefab/uiPanel/PlantPanel.prefab
  22. 222 133
      assets/resources/module/setting/setting.prefab
  23. 21 278
      assets/scene/MainScene.fire
  24. 165 0
      assets/script/before/main/FactoryIcon.ts
  25. 0 0
      assets/script/before/main/FactoryIcon.ts.meta
  26. 23 0
      assets/script/before/main/FactorySystem.ts
  27. 9 0
      assets/script/before/main/FactorySystem.ts.meta
  28. 5 4
      assets/script/before/main/FarmCountDown.ts
  29. 19 33
      assets/script/before/main/FarmIcon.ts
  30. 0 97
      assets/script/before/main/MapIcon.ts
  31. 14 7
      assets/script/before/main/PastureData.ts
  32. 30 22
      assets/script/before/main/PastureIcon.ts
  33. 22 0
      assets/script/before/main/PastureSystem.ts
  34. 9 0
      assets/script/before/main/PastureSystem.ts.meta
  35. 26 12
      assets/script/before/map/MapMove.ts
  36. 35 18
      assets/script/before/view/Animals.ts
  37. 1 1
      assets/script/before/view/ProductShow.ts
  38. 16 4
      assets/script/before/view/data/ADClearSickData.ts
  39. 28 1
      assets/script/before/view/ui/ADClearSickPanel.ts
  40. 4 0
      assets/script/before/view/ui/PlantPanel.ts
  41. 37 6
      assets/script/before/view/uiItem/PlantItem.ts
  42. 26 36
      assets/script/game/component/TableView.ts
  43. 6 3
      assets/script/game/data/GData.ts
  44. 166 35
      assets/script/game/data/GameData.ts
  45. 1 1
      assets/script/game/data/LoginData.ts
  46. 1 0
      assets/script/game/game/Game.ts
  47. 6 2
      assets/script/game/module/login/Login.ts
  48. 8 10
      assets/script/game/module/setting/Setting.ts
  49. 7 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/kxnly.iml
  50. 341 156
      build/jsb-link/js backups (useful for debugging)/main.index.js
  51. 2 2
      packages-hot-update/cfg.json
  52. 1 1
      settings/project.json

+ 42 - 6
assets/resources/animation/animals/30001_0.anim

@@ -3,7 +3,7 @@
   "_name": "30001_0",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 0.5,
+  "_duration": 1.1,
   "sample": 10,
   "speed": 1,
   "wrapMode": 2,
@@ -14,31 +14,67 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "ba8757f4-1bc2-4e0f-ba3e-0fbf80e9e11c@6c48a"
+              "__uuid__": "758ccc30-fbca-4563-861a-ab2af3532a1a@6c48a"
             }
           },
           {
             "frame": 0.1,
             "value": {
-              "__uuid__": "9f7a42d5-e42a-4910-b797-3fd4701a8cfd@6c48a"
+              "__uuid__": "52ca53d7-d9f5-4a69-872d-35f3faed3baa@6c48a"
             }
           },
           {
             "frame": 0.2,
             "value": {
-              "__uuid__": "d56a4684-25bf-42d7-baa7-f5b00c3fb9a0@6c48a"
+              "__uuid__": "650de508-eace-42e9-9d29-ba1623cc315d@6c48a"
             }
           },
           {
             "frame": 0.3,
             "value": {
-              "__uuid__": "645a570a-40d2-477f-a6a4-ab5cebd1a52d@6c48a"
+              "__uuid__": "4bed49a6-fd24-4af0-8a76-c7e47500eaec@6c48a"
             }
           },
           {
             "frame": 0.4,
             "value": {
-              "__uuid__": "ccf664d1-9e9c-4526-b8de-a3d368db38b8@6c48a"
+              "__uuid__": "e3d1246e-1f7f-4afe-8476-3b2e0cd381ef@6c48a"
+            }
+          },
+          {
+            "frame": 0.5,
+            "value": {
+              "__uuid__": "b6de6ef0-d130-46ce-8850-e90595b358f3@6c48a"
+            }
+          },
+          {
+            "frame": 0.6,
+            "value": {
+              "__uuid__": "135074a1-e43f-49e7-969a-a27c8ebd5b40@6c48a"
+            }
+          },
+          {
+            "frame": 0.7,
+            "value": {
+              "__uuid__": "91957171-80ca-4689-a60c-c44eda906f27@6c48a"
+            }
+          },
+          {
+            "frame": 0.8,
+            "value": {
+              "__uuid__": "b4dc0602-3d21-4cd5-977f-35091f0737de@6c48a"
+            }
+          },
+          {
+            "frame": 0.9,
+            "value": {
+              "__uuid__": "0d9c914b-e68e-4374-a3a8-95f80c1a17bd@6c48a"
+            }
+          },
+          {
+            "frame": 1,
+            "value": {
+              "__uuid__": "75dc4b7c-8769-4c36-a776-12b26807f257@6c48a"
             }
           }
         ]

+ 43 - 13
assets/resources/animation/animals/30001_1.anim

@@ -1,9 +1,9 @@
 {
   "__type__": "cc.AnimationClip",
-  "_name": "30001_0",
+  "_name": "30001_1",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 1.1,
+  "_duration": 1.6,
   "sample": 10,
   "speed": 1,
   "wrapMode": 2,
@@ -14,67 +14,97 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "758ccc30-fbca-4563-861a-ab2af3532a1a@6c48a"
+              "__uuid__": "77dc72a1-6ea4-47f7-b456-ceb9529fe18e@6c48a"
             }
           },
           {
             "frame": 0.1,
             "value": {
-              "__uuid__": "52ca53d7-d9f5-4a69-872d-35f3faed3baa@6c48a"
+              "__uuid__": "8028a8af-5e8c-448e-9684-a000bfa31068@6c48a"
             }
           },
           {
             "frame": 0.2,
             "value": {
-              "__uuid__": "650de508-eace-42e9-9d29-ba1623cc315d@6c48a"
+              "__uuid__": "6d431132-8fad-4d8b-8825-ec8a86960a23@6c48a"
             }
           },
           {
             "frame": 0.3,
             "value": {
-              "__uuid__": "4bed49a6-fd24-4af0-8a76-c7e47500eaec@6c48a"
+              "__uuid__": "eb430c4f-d662-49ae-ac6c-ecdd3a4f60b8@6c48a"
             }
           },
           {
             "frame": 0.4,
             "value": {
-              "__uuid__": "e3d1246e-1f7f-4afe-8476-3b2e0cd381ef@6c48a"
+              "__uuid__": "6916d42b-993c-4f1a-a431-26ae08bf8bfd@6c48a"
             }
           },
           {
             "frame": 0.5,
             "value": {
-              "__uuid__": "b6de6ef0-d130-46ce-8850-e90595b358f3@6c48a"
+              "__uuid__": "e198b429-f7b2-41c2-a8f1-0f20a0460d24@6c48a"
             }
           },
           {
             "frame": 0.6,
             "value": {
-              "__uuid__": "135074a1-e43f-49e7-969a-a27c8ebd5b40@6c48a"
+              "__uuid__": "854283f1-0768-4583-98b1-030720444928@6c48a"
             }
           },
           {
             "frame": 0.7,
             "value": {
-              "__uuid__": "91957171-80ca-4689-a60c-c44eda906f27@6c48a"
+              "__uuid__": "1b7786b7-3da7-4043-a63f-7297c31254a7@6c48a"
             }
           },
           {
             "frame": 0.8,
             "value": {
-              "__uuid__": "b4dc0602-3d21-4cd5-977f-35091f0737de@6c48a"
+              "__uuid__": "3291f4a2-36f1-4bdf-ae7b-b74aa9b4b82a@6c48a"
             }
           },
           {
             "frame": 0.9,
             "value": {
-              "__uuid__": "0d9c914b-e68e-4374-a3a8-95f80c1a17bd@6c48a"
+              "__uuid__": "2c16b1c4-0416-472b-9f76-50b2b11d0375@6c48a"
             }
           },
           {
             "frame": 1,
             "value": {
-              "__uuid__": "75dc4b7c-8769-4c36-a776-12b26807f257@6c48a"
+              "__uuid__": "37ffd007-94a5-4ad3-97d1-11d3f3cd9713@6c48a"
+            }
+          },
+          {
+            "frame": 1.1,
+            "value": {
+              "__uuid__": "bcefdf9f-6446-40ca-a2b2-2f43df13bd92@6c48a"
+            }
+          },
+          {
+            "frame": 1.2,
+            "value": {
+              "__uuid__": "ea77951a-b11e-4e7f-9d48-0711d764f9b5@6c48a"
+            }
+          },
+          {
+            "frame": 1.3,
+            "value": {
+              "__uuid__": "c6c89472-f176-43d5-8756-52ec70c609ee@6c48a"
+            }
+          },
+          {
+            "frame": 1.4,
+            "value": {
+              "__uuid__": "8a823635-39d9-4b36-8137-c8381af77bd1@6c48a"
+            }
+          },
+          {
+            "frame": 1.5,
+            "value": {
+              "__uuid__": "a473ee06-5aa8-4ac2-ad93-8093a3bff932@6c48a"
             }
           }
         ]

+ 7 - 43
assets/resources/animation/animals/30001_2.anim

@@ -1,9 +1,9 @@
 {
   "__type__": "cc.AnimationClip",
-  "_name": "30001_0",
+  "_name": "30001_2",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 1.1,
+  "_duration": 0.5,
   "sample": 10,
   "speed": 1,
   "wrapMode": 2,
@@ -14,67 +14,31 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "758ccc30-fbca-4563-861a-ab2af3532a1a@6c48a"
+              "__uuid__": "ba8757f4-1bc2-4e0f-ba3e-0fbf80e9e11c@6c48a"
             }
           },
           {
             "frame": 0.1,
             "value": {
-              "__uuid__": "52ca53d7-d9f5-4a69-872d-35f3faed3baa@6c48a"
+              "__uuid__": "9f7a42d5-e42a-4910-b797-3fd4701a8cfd@6c48a"
             }
           },
           {
             "frame": 0.2,
             "value": {
-              "__uuid__": "650de508-eace-42e9-9d29-ba1623cc315d@6c48a"
+              "__uuid__": "d56a4684-25bf-42d7-baa7-f5b00c3fb9a0@6c48a"
             }
           },
           {
             "frame": 0.3,
             "value": {
-              "__uuid__": "4bed49a6-fd24-4af0-8a76-c7e47500eaec@6c48a"
+              "__uuid__": "645a570a-40d2-477f-a6a4-ab5cebd1a52d@6c48a"
             }
           },
           {
             "frame": 0.4,
             "value": {
-              "__uuid__": "e3d1246e-1f7f-4afe-8476-3b2e0cd381ef@6c48a"
-            }
-          },
-          {
-            "frame": 0.5,
-            "value": {
-              "__uuid__": "b6de6ef0-d130-46ce-8850-e90595b358f3@6c48a"
-            }
-          },
-          {
-            "frame": 0.6,
-            "value": {
-              "__uuid__": "135074a1-e43f-49e7-969a-a27c8ebd5b40@6c48a"
-            }
-          },
-          {
-            "frame": 0.7,
-            "value": {
-              "__uuid__": "91957171-80ca-4689-a60c-c44eda906f27@6c48a"
-            }
-          },
-          {
-            "frame": 0.8,
-            "value": {
-              "__uuid__": "b4dc0602-3d21-4cd5-977f-35091f0737de@6c48a"
-            }
-          },
-          {
-            "frame": 0.9,
-            "value": {
-              "__uuid__": "0d9c914b-e68e-4374-a3a8-95f80c1a17bd@6c48a"
-            }
-          },
-          {
-            "frame": 1,
-            "value": {
-              "__uuid__": "75dc4b7c-8769-4c36-a776-12b26807f257@6c48a"
+              "__uuid__": "ccf664d1-9e9c-4526-b8de-a3d368db38b8@6c48a"
             }
           }
         ]

+ 42 - 6
assets/resources/animation/animals/30002_0.anim

@@ -3,7 +3,7 @@
   "_name": "30002_0",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 0.8333333333333334,
+  "_duration": 1.8333333333333333,
   "sample": 6,
   "speed": 1,
   "wrapMode": 2,
@@ -14,31 +14,67 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "b5d9d9c0-a5e8-4be1-b858-2ac5a8fa457a@6c48a"
+              "__uuid__": "dcba9df1-05a1-4748-8294-0413a5362ee0@6c48a"
             }
           },
           {
             "frame": 0.16666666666666666,
             "value": {
-              "__uuid__": "b7371d1a-8499-4b90-910d-20169d53fe4f@6c48a"
+              "__uuid__": "e2bac86a-cfd8-40a6-aaa5-08589384f674@6c48a"
             }
           },
           {
             "frame": 0.3333333333333333,
             "value": {
-              "__uuid__": "12f85d58-a190-4884-a415-5c3120591c76@6c48a"
+              "__uuid__": "d7bcd950-ea00-4be1-9bd3-ee60743854da@6c48a"
             }
           },
           {
             "frame": 0.5,
             "value": {
-              "__uuid__": "e691ba4b-ae4e-4acb-b453-9db03c380056@6c48a"
+              "__uuid__": "8a7cad4c-0497-4521-ad77-927950a80e9d@6c48a"
             }
           },
           {
             "frame": 0.6666666666666666,
             "value": {
-              "__uuid__": "821cbb9c-c31b-426a-8c8d-08c6cf498967@6c48a"
+              "__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"
             }
           }
         ]

+ 37 - 13
assets/resources/animation/animals/30002_1.anim

@@ -1,9 +1,9 @@
 {
   "__type__": "cc.AnimationClip",
-  "_name": "30002_0",
+  "_name": "30002_1",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 1.8333333333333333,
+  "_duration": 2.5,
   "sample": 6,
   "speed": 1,
   "wrapMode": 2,
@@ -14,67 +14,91 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "dcba9df1-05a1-4748-8294-0413a5362ee0@6c48a"
+              "__uuid__": "55166111-4788-4413-9a50-986e13dfbb65@6c48a"
             }
           },
           {
             "frame": 0.16666666666666666,
             "value": {
-              "__uuid__": "e2bac86a-cfd8-40a6-aaa5-08589384f674@6c48a"
+              "__uuid__": "e5936cfb-dd1b-424d-8db9-41f9f8139be4@6c48a"
             }
           },
           {
             "frame": 0.3333333333333333,
             "value": {
-              "__uuid__": "d7bcd950-ea00-4be1-9bd3-ee60743854da@6c48a"
+              "__uuid__": "57900286-c4c5-468c-a958-6cde104a92e4@6c48a"
             }
           },
           {
             "frame": 0.5,
             "value": {
-              "__uuid__": "8a7cad4c-0497-4521-ad77-927950a80e9d@6c48a"
+              "__uuid__": "526b965a-f5b5-4778-b5e9-960b21069316@6c48a"
             }
           },
           {
             "frame": 0.6666666666666666,
             "value": {
-              "__uuid__": "0105edf5-75a1-46f2-a008-148e4f338eab@6c48a"
+              "__uuid__": "243339d9-2238-4910-85df-996bad64a38a@6c48a"
             }
           },
           {
             "frame": 0.8333333333333334,
             "value": {
-              "__uuid__": "288ed40f-8e11-4131-a424-fdeaa91c9474@6c48a"
+              "__uuid__": "157a595d-b507-4f39-908f-cab4cef52d05@6c48a"
             }
           },
           {
             "frame": 1,
             "value": {
-              "__uuid__": "e4346a63-8afc-416f-bf05-cc41e3ece5e8@6c48a"
+              "__uuid__": "6cacf56a-09fd-48ed-a672-24ac19586a0c@6c48a"
             }
           },
           {
             "frame": 1.1666666666666667,
             "value": {
-              "__uuid__": "5b75f67f-7526-4df1-9346-707fc3cba9a6@6c48a"
+              "__uuid__": "616e64c3-6f46-4d1d-bf30-08b9aa83aa6f@6c48a"
             }
           },
           {
             "frame": 1.3333333333333333,
             "value": {
-              "__uuid__": "91178ada-b582-47d2-9aa6-940ed26e0263@6c48a"
+              "__uuid__": "edae4939-706d-47f4-a0f9-d6418cb7cf0f@6c48a"
             }
           },
           {
             "frame": 1.5,
             "value": {
-              "__uuid__": "de2033f9-0773-4848-8b3b-a4a4df3b4d3c@6c48a"
+              "__uuid__": "2c110b0f-7965-4562-b7be-f3b92b4e6e16@6c48a"
             }
           },
           {
             "frame": 1.6666666666666667,
             "value": {
-              "__uuid__": "e529fa0e-a364-4c9f-8b7e-0f81e403bf2c@6c48a"
+              "__uuid__": "8cb2fe7e-c885-4322-8a90-82832a024e27@6c48a"
+            }
+          },
+          {
+            "frame": 1.8333333333333333,
+            "value": {
+              "__uuid__": "b24733bf-1bac-4a3d-9900-75763ed7aa11@6c48a"
+            }
+          },
+          {
+            "frame": 2,
+            "value": {
+              "__uuid__": "cc3959e1-1d6f-4524-8958-7e2cfddeb248@6c48a"
+            }
+          },
+          {
+            "frame": 2.1666666666666665,
+            "value": {
+              "__uuid__": "9c6d0b64-4a9d-42a6-aa1c-e198a5ab0899@6c48a"
+            }
+          },
+          {
+            "frame": 2.3333333333333335,
+            "value": {
+              "__uuid__": "24f48dd7-d67c-4108-91be-9b6b390b43c1@6c48a"
             }
           }
         ]

+ 7 - 43
assets/resources/animation/animals/30002_2.anim

@@ -1,9 +1,9 @@
 {
   "__type__": "cc.AnimationClip",
-  "_name": "30002_0",
+  "_name": "30002_2",
   "_objFlags": 0,
   "_native": "",
-  "_duration": 1.8333333333333333,
+  "_duration": 0.8333333333333334,
   "sample": 6,
   "speed": 1,
   "wrapMode": 2,
@@ -14,67 +14,31 @@
           {
             "frame": 0,
             "value": {
-              "__uuid__": "dcba9df1-05a1-4748-8294-0413a5362ee0@6c48a"
+              "__uuid__": "b5d9d9c0-a5e8-4be1-b858-2ac5a8fa457a@6c48a"
             }
           },
           {
             "frame": 0.16666666666666666,
             "value": {
-              "__uuid__": "e2bac86a-cfd8-40a6-aaa5-08589384f674@6c48a"
+              "__uuid__": "b7371d1a-8499-4b90-910d-20169d53fe4f@6c48a"
             }
           },
           {
             "frame": 0.3333333333333333,
             "value": {
-              "__uuid__": "d7bcd950-ea00-4be1-9bd3-ee60743854da@6c48a"
+              "__uuid__": "12f85d58-a190-4884-a415-5c3120591c76@6c48a"
             }
           },
           {
             "frame": 0.5,
             "value": {
-              "__uuid__": "8a7cad4c-0497-4521-ad77-927950a80e9d@6c48a"
+              "__uuid__": "e691ba4b-ae4e-4acb-b453-9db03c380056@6c48a"
             }
           },
           {
             "frame": 0.6666666666666666,
             "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__": "821cbb9c-c31b-426a-8c8d-08c6cf498967@6c48a"
             }
           }
         ]

+ 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": {}
 }

Разница между файлами не показана из-за своего большого размера
+ 149 - 214
assets/resources/game/coregame/coregame.prefab


BIN
assets/resources/game/coregame/texture/pasture/factory_clock.png


+ 36 - 0
assets/resources/game/coregame/texture/pasture/factory_clock.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "1e5450e4-d656-4032-b12e-4740fa8301c8",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 42,
+  "height": 42,
+  "platformSettings": {},
+  "subMetas": {
+    "factory_clock": {
+      "ver": "1.0.4",
+      "uuid": "098ff903-6b7d-440c-9759-9ded1e6490e9",
+      "rawTextureUuid": "1e5450e4-d656-4032-b12e-4740fa8301c8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 42,
+      "height": 42,
+      "rawWidth": 42,
+      "rawHeight": 42,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 3 - 1
assets/resources/game/prefab/paster_30001.prefab

@@ -294,7 +294,9 @@
       "__id__": 5
     },
     "_enabled": true,
-    "_defaultClip": null,
+    "_defaultClip": {
+      "__uuid__": "fafa4550-a7d9-46a1-a7f7-4af55a8601d8"
+    },
     "_clips": [
       {
         "__uuid__": "24a9d6ea-68e1-41c7-a2b9-adfd11c183df"

+ 22 - 3
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": {
@@ -290,7 +294,9 @@
       "__id__": 5
     },
     "_enabled": true,
-    "_defaultClip": null,
+    "_defaultClip": {
+      "__uuid__": "69c863e8-09ae-49f5-bcc7-31bce7f73f07"
+    },
     "_clips": [
       {
         "__uuid__": "6c85c6c0-10d8-46cc-943f-7b7cf9766fc9"
@@ -317,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

+ 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

+ 45 - 45
assets/resources/game/prefab/uiItem/PlantItem.prefab

@@ -193,8 +193,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 60,
-      "height": 60
+      "width": 80,
+      "height": 80
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -206,7 +206,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        91.5,
+        105.5,
         0,
         0,
         0,
@@ -312,15 +312,15 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        56.98,
-        131,
+        49.98,
+        123,
         0,
         0,
         0,
         0,
         1,
-        1,
-        1,
+        1.2,
+        1.2,
         1
       ]
     },
@@ -424,14 +424,14 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        32,
+        37,
         0,
         0,
         0,
         0,
         1,
-        1,
-        1,
+        1.2,
+        1.2,
         1
       ]
     },
@@ -632,7 +632,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 82,
+      "width": 80,
       "height": 20
     },
     "_anchorPoint": {
@@ -645,14 +645,14 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -7.5,
+        -3.9109999999999996,
         0,
         0,
         0,
         0,
         1,
-        1,
-        1,
+        1.4,
+        1.4,
         1
       ]
     },
@@ -706,7 +706,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 20,
+      "width": 18,
       "height": 20
     },
     "_anchorPoint": {
@@ -770,8 +770,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 10,
-      "height": 14
+      "width": 7,
+      "height": 13
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -782,7 +782,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -5,
+        -5.5,
         0,
         0,
         0,
@@ -823,7 +823,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "446789ed-a3ab-4902-babe-5f02e0fbf29f@6c48a"
+      "__uuid__": "b1b0e542-e734-47ac-bea9-31655b02a68b@6c48a"
     },
     "_type": 0,
     "_sizeMode": 1,
@@ -877,8 +877,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 10,
-      "height": 14
+      "width": 11,
+      "height": 13
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -889,7 +889,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        5,
+        3.5,
         0,
         0,
         0,
@@ -930,7 +930,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "2c5729a5-1a9e-44eb-bbff-b164d273d6d7@6c48a"
+      "__uuid__": "4c775cea-16eb-4583-b1c2-efc300c546f0@6c48a"
     },
     "_type": 0,
     "_sizeMode": 1,
@@ -997,7 +997,7 @@
         "__uuid__": "d178f694-3abf-4895-9bbe-5d21925c8a07@6c48a"
       }
     ],
-    "_string": "10",
+    "_string": "14",
     "_id": ""
   },
   {
@@ -1010,7 +1010,7 @@
     "_enabled": true,
     "_layoutSize": {
       "__type__": "cc.Size",
-      "width": 20,
+      "width": 18,
       "height": 20
     },
     "_resize": 1,
@@ -1082,7 +1082,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        11,
+        10,
         0,
         0,
         0,
@@ -1160,7 +1160,7 @@
     "_enabled": true,
     "_layoutSize": {
       "__type__": "cc.Size",
-      "width": 82,
+      "width": 80,
       "height": 20
     },
     "_resize": 1,
@@ -1243,8 +1243,8 @@
         0,
         0,
         1,
-        1,
-        1,
+        1.2,
+        1.2,
         1
       ]
     },
@@ -1725,7 +1725,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -118,
+        -121,
         0,
         0,
         0,
@@ -1789,7 +1789,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        0,
+        2,
         0,
         0,
         0,
@@ -2059,18 +2059,18 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 180,
-      "height": 207.8
+      "height": 131.8
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0,
+      "x": 0.5,
       "y": 0.5
     },
     "_trs": {
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        0,
+        90.936,
         0,
         0,
         0,
@@ -2122,8 +2122,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 176,
-      "height": 176
+      "width": 60,
+      "height": 60
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2134,15 +2134,15 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        89,
-        15.900000000000006,
+        0,
+        35.900000000000006,
         0,
         0,
         0,
         0,
         1,
-        0.3,
-        0.3,
+        1,
+        1,
         1
       ]
     },
@@ -2178,7 +2178,7 @@
       "__uuid__": "0c860566-4520-434f-9286-27075963cff4"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -2244,8 +2244,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        89,
-        -68,
+        0,
+        -29.999999999999993,
         0,
         0,
         0,
@@ -2342,7 +2342,7 @@
     "_layoutSize": {
       "__type__": "cc.Size",
       "width": 180,
-      "height": 207.8
+      "height": 131.8
     },
     "_resize": 1,
     "_N$layoutType": 2,
@@ -2357,7 +2357,7 @@
     "_N$paddingTop": 0,
     "_N$paddingBottom": 0,
     "_N$spacingX": 0,
-    "_N$spacingY": -40,
+    "_N$spacingY": 0,
     "_N$verticalDirection": 1,
     "_N$horizontalDirection": 0,
     "_N$affectedByScale": false,

+ 23 - 14
assets/resources/game/prefab/uiPanel/ADClearSickPanel.prefab

@@ -293,7 +293,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "labDes",
+    "_name": "标题",
     "_objFlags": 0,
     "_parent": {
       "__id__": 2
@@ -401,7 +401,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "立即获得文本",
+    "_name": "描述",
     "_objFlags": 0,
     "_parent": {
       "__id__": 2
@@ -1144,7 +1144,7 @@
       "__id__": 1
     },
     "component": "",
-    "_componentId": "0c4f2VNCqNOEaoWvFRThSJc",
+    "_componentId": "71919vKJEFKFoYN99f49WIs",
     "handler": "clickWatchVideo",
     "customEventData": ""
   },
@@ -1259,21 +1259,11 @@
       "__id__": 1
     },
     "component": "",
-    "_componentId": "0c4f2VNCqNOEaoWvFRThSJc",
+    "_componentId": "71919vKJEFKFoYN99f49WIs",
     "handler": "onClickClose",
     "customEventData": ""
   },
   {
-    "__type__": "0c4f2VNCqNOEaoWvFRThSJc",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "_id": ""
-  },
-  {
     "__type__": "ac053zwqaRD6IJmTlQWmefZ",
     "_name": "",
     "_objFlags": 0,
@@ -1293,6 +1283,25 @@
     "_id": ""
   },
   {
+    "__type__": "71919vKJEFKFoYN99f49WIs",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "labTitle": {
+      "__id__": 8
+    },
+    "labDes": {
+      "__id__": 11
+    },
+    "sp": {
+      "__id__": 16
+    },
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 166 - 31
assets/resources/game/prefab/uiPanel/PlantPanel.prefab

@@ -24,20 +24,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 18
+        "__id__": 22
       },
       {
-        "__id__": 19
+        "__id__": 23
       },
       {
-        "__id__": 20
+        "__id__": 24
       },
       {
-        "__id__": 21
+        "__id__": 25
       }
     ],
     "_prefab": {
-      "__id__": 22
+      "__id__": 26
     },
     "_opacity": 255,
     "_color": {
@@ -99,19 +99,22 @@
       },
       {
         "__id__": 6
+      },
+      {
+        "__id__": 10
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 15
+        "__id__": 19
       },
       {
-        "__id__": 16
+        "__id__": 20
       }
     ],
     "_prefab": {
-      "__id__": 17
+      "__id__": 21
     },
     "_opacity": 255,
     "_color": {
@@ -123,7 +126,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 750.0000000000001,
+      "width": 750,
       "height": 500
     },
     "_anchorPoint": {
@@ -135,8 +138,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        981.4070000000002,
-        -175.98299999999995,
+        981.4069999999999,
+        -209.02800000000002,
         0,
         0,
         0,
@@ -269,6 +272,135 @@
   },
   {
     "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 250,
+      "g": 255,
+      "b": 173,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 570,
+      "height": 60.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        7,
+        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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "收获即可得红包,真提现无套路",
+    "_N$string": "收获即可得红包,真提现无套路",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 1,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 104,
+      "g": 49,
+      "b": 11,
+      "a": 255
+    },
+    "_width": 5,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "6c4cddd9-4029-4d7b-b09d-8cae76051b8c"
+    },
+    "fileId": "52QjhYWnJJ+J3piecWE9s0",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
     "_name": "滚动视图",
     "_objFlags": 0,
     "_parent": {
@@ -276,20 +408,20 @@
     },
     "_children": [
       {
-        "__id__": 7
+        "__id__": 11
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 12
+        "__id__": 16
       },
       {
-        "__id__": 13
+        "__id__": 17
       }
     ],
     "_prefab": {
-      "__id__": 14
+      "__id__": 18
     },
     "_opacity": 255,
     "_color": {
@@ -314,7 +446,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -273.297,
+        -249.416,
         0,
         0,
         0,
@@ -343,21 +475,21 @@
     "_name": "view",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 6
+      "__id__": 10
     },
     "_children": [
       {
-        "__id__": 8
+        "__id__": 12
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 10
+        "__id__": 14
       }
     ],
     "_prefab": {
-      "__id__": 11
+      "__id__": 15
     },
     "_opacity": 255,
     "_color": {
@@ -411,13 +543,13 @@
     "_name": "content",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 7
+      "__id__": 11
     },
     "_children": [],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 9
+      "__id__": 13
     },
     "_opacity": 255,
     "_color": {
@@ -482,7 +614,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 7
+      "__id__": 11
     },
     "_enabled": true,
     "_materials": [
@@ -513,7 +645,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 6
+      "__id__": 10
     },
     "_enabled": true,
     "horizontal": true,
@@ -525,10 +657,10 @@
     "scrollEvents": [],
     "cancelInnerEvents": false,
     "_N$content": {
-      "__id__": 8
+      "__id__": 12
     },
     "content": {
-      "__id__": 8
+      "__id__": 12
     },
     "_N$horizontalScrollBar": null,
     "_N$verticalScrollBar": null,
@@ -539,7 +671,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 6
+      "__id__": 10
     },
     "_enabled": true,
     "pre_item": [
@@ -552,7 +684,10 @@
     ],
     "itemInterval": 10,
     "node_xiabiao": null,
+    "isShowByLimitLength": false,
+    "limitLength": 0,
     "direction": 2,
+    "isHideAllChild": false,
     "_id": ""
   },
   {
@@ -609,10 +744,10 @@
     "alignMode": 1,
     "_target": null,
     "_alignFlags": 44,
-    "_left": 981.407,
-    "_right": -981.407,
+    "_left": 981.4069999999999,
+    "_right": -981.4069999999999,
     "_top": 0,
-    "_bottom": -8.983000000000004,
+    "_bottom": -42.02799999999996,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
     "_isAbsLeft": true,
@@ -713,7 +848,7 @@
     },
     "_enabled": true,
     "tableView": {
-      "__id__": 13
+      "__id__": 17
     },
     "_id": ""
   },

Разница между файлами не показана из-за своего большого размера
+ 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"
   },

+ 165 - 0
assets/script/before/main/FactoryIcon.ts

@@ -0,0 +1,165 @@
+import { FactroyState, ProductType } from "../../game/data/GameData";
+import ProductShow from "../view/ProductShow";
+import { FarmCountDown } from "./FarmCountDown";
+import { IDHelper } from "./IDHelper";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export class FactoryIcon extends cc.Component {
+    @property({ type: FarmCountDown, tooltip: "倒计时组件" }) countDown: FarmCountDown = null;
+    @property({ type: cc.Node, tooltip: "完成品展示节点" }) showGroup: cc.Node = null;
+
+    public configID: number = 0;
+    public sortID: number = 0;
+    private tab: ProductType = ProductType.bmhc;
+
+    private _state: FactroyState = -1;
+    public get state(): FactroyState { return this._state; }
+
+    data = null;
+
+    onLoad() {
+        let helper = this.getComponent(IDHelper);
+        this.configID = helper.buildID;
+        this.sortID = helper.sortID;
+
+        switch (this.configID) {
+            case 30004:
+                this.tab = ProductType.bmhc;
+                break;
+            case 30005:
+                this.tab = ProductType.gdp;
+                break;
+            case 30006:
+                this.tab = ProductType.ztc;
+                break;
+            case 30007:
+                this.tab = ProductType.lrc;
+                break;
+            case 30008:
+                this.tab = ProductType.gfmg;
+                break;
+            case 30009:
+                this.tab = ProductType.kcd;
+                break;
+        }
+        this.countDown.node.active = false;
+
+        this.freshState();
+    }
+
+    update() {
+        let index = gData.gameData.needFreshArr.indexOf(this.configID);
+        if (index != -1) {
+            this.freshState();
+            gData.gameData.needFreshArr.splice(index, 1);
+        }
+    }
+
+    freshState() {
+        this.data = gData.gameData.getFactoryDataMap(this.configID);
+        this.setState(this.data.state);
+    }
+
+    private setState(value: FactroyState): void {
+        if (this.state != value) {
+            this._state = value;
+            this.countDown.node.active = false;
+
+            switch (this.state) {
+                case FactroyState.Lock:
+
+                    break;
+                case FactroyState.Empty:
+
+                    break;
+                case FactroyState.Producting:
+                    this.countDown.node.active = true;
+                    this.countDown.setData(this.data);
+                    break;
+                case FactroyState.Ripe:
+                    this.countDown.node.active = true;
+                    this.countDown.setState(1);
+                    this.onProductComplete();
+                    break;
+                case FactroyState.Sick:
+                    this.countDown.node.active = true;
+                    this.countDown.setState(0);
+                    break;
+            }
+        }
+    }
+
+    /**生产完成 */
+    private async onProductComplete() {
+        if (this.showGroup) {
+            let prefab = await mk.loader.load("game/prefab/ProductShow", cc.Prefab);
+            let item = cc.instantiate(prefab);
+            let id = this.data.productID;
+            item.getComponent(ProductShow).id = id;
+            item.parent = this.showGroup;
+        }
+    }
+
+    private clean(): void {
+        this.showGroup.removeAllChildren();
+    }
+
+    public async onTouch() {
+        switch (this.data.state) {
+            case FactroyState.Lock:
+                let arr = gData.gameData.getProductArrByType(this.tab);
+                let lv = arr[0].value;
+                mk.tip.pop(`农场达到${lv}级解锁`);
+                break;
+            case FactroyState.Empty:
+                gData.factorySystem.currSelectFactory = this;
+                gData.plantData.openPanel(this.tab, this.configID);
+                break;
+            case FactroyState.Ripe:
+                gData.factorySystem.currSelectFactory = this;
+                gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this));
+                break;
+            case FactroyState.Sick:
+                // mk.tip.pop(`生虫了!`);
+                gData.adClearSickData.openPanel(this.tab, this.configID);
+                break;
+        }
+    }
+
+    public make(id) {
+        if (this.data.state == FactroyState.Empty) {
+            let config = gData.gameData.getProductMap(id);
+            let growSpan = Date.now() + config.time * 1000;
+            this.data.state = FactroyState.Producting;
+            this.data.productID = config.picture;
+            this.data.growSpan = growSpan;
+            gData.gameData.setFactoryDataMap(this.configID, this.data);
+        }
+    }
+
+    onRipe() {
+        this._state = FactroyState.Ripe;
+        this.data.state = FactroyState.Ripe;
+        gData.gameData.setFactoryDataMap(this.configID, this.data);
+        gData.gameData.addProductMakeTimesById(this.data.productID);
+    }
+
+    onSick() {
+        this._state = FactroyState.Sick;
+        this.data.state = FactroyState.Sick;
+        gData.gameData.setFactoryDataMap(this.configID, this.data);
+    }
+
+    public onHarvest(): void {
+        this.countDown.cleanRiped();
+        this.clean();
+        gData.factorySystem.currSelectFactory = null;
+
+        this.data.state = FactroyState.Empty;
+        this.data.productID = 0;
+        this.data.growSpan = 0;
+        gData.gameData.setFactoryDataMap(this.configID, this.data);
+    }
+}

+ 0 - 0
assets/script/before/main/MapIcon.ts.meta → assets/script/before/main/FactoryIcon.ts.meta


+ 23 - 0
assets/script/before/main/FactorySystem.ts

@@ -0,0 +1,23 @@
+/** 工厂数据类 */
+
+import { ProductType } from "../../game/data/GameData";
+import { FactoryIcon } from "./FactoryIcon";
+
+const { ccclass } = cc._decorator;
+
+@ccclass
+export default class FactorySystem {
+    private _currSelectFactory: FactoryIcon = null;
+
+    public set currSelectFactory(factory: FactoryIcon) {
+        this._currSelectFactory = factory;
+    }
+
+    public get currSelectFactory(): FactoryIcon {
+        return this._currSelectFactory;
+    }
+
+    public make(id: number): void {
+        this._currSelectFactory && this._currSelectFactory.make(id);
+    }
+}

+ 9 - 0
assets/script/before/main/FactorySystem.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "7c2bbe21-cff0-4999-8563-fd30737baa03",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 5 - 4
assets/script/before/main/FarmCountDown.ts

@@ -9,7 +9,7 @@ export class FarmCountDown extends cc.Component {
     @property({ type: cc.Component.EventHandler, tooltip: "生虫回调" }) onSick: cc.Component.EventHandler = null;
     @property({ type: cc.Component.EventHandler, tooltip: "加速按钮回调" }) onSpeedButton: cc.Component.EventHandler = null;
     @property({ type: cc.Node, tooltip: "常驻计时器组" }) normalGroup: cc.Node = null;
-    @property({ type: cc.ProgressBar, tooltip: "常驻进度条" }) normalProgress: cc.ProgressBar = null;
+    @property({ type: cc.Sprite, tooltip: "常驻进度条" }) normalProgress: cc.Sprite = null;
     @property({ type: BitmapFontC, tooltip: "常驻计时" }) normalCount: BitmapFontC = null;
     @property({ type: cc.Node, tooltip: "可收获图标" }) ripedIcon: cc.Node = null;
     @property({ type: cc.Node, tooltip: "生病图标" }) sickIcon: cc.Node = null;
@@ -32,7 +32,7 @@ export class FarmCountDown extends cc.Component {
             this.sickIcon.active = false;
             this.counting = true;
             this.normalCount.string = '';
-            this.normalProgress.progress = 0;
+            this.normalProgress.fillRange = 0;
         }
     }
 
@@ -41,7 +41,7 @@ export class FarmCountDown extends cc.Component {
         if (this.counting && now < this.ripeTime) {
             let timeString = Util.ParseTime2Format(Math.floor((this.ripeTime - now) * 0.001), 'm:s');
             this.normalCount.string = timeString;
-            this.normalProgress.progress = 1 - ((this.ripeTime - now) / (this.totleTime * 1000));
+            this.normalProgress.fillRange = 1 - ((this.ripeTime - now) / (this.totleTime * 1000));
         } else if (this.counting && now > this.ripeTime) {
             if (!this.isRipeInit) {
                 this.isRipeInit = true;
@@ -77,8 +77,9 @@ export class FarmCountDown extends cc.Component {
      * @param state 0 生虫 1 成熟
      */
     setState(state) {
-        this.normalProgress.progress = 0;
+        this.normalProgress.fillRange = 0;
         this.normalCount.string = '';
+        this.normalGroup.active = false;
         if (state == 0) {
             this.sickIcon.active = true;
             this.ripedIcon.active = false;

+ 19 - 33
assets/script/before/main/FarmIcon.ts

@@ -1,13 +1,10 @@
 import { FarmState, ProductType } from '../../game/data/GameData';
-import { Data } from '../../mk/data/Data';
 import { MoveToCenter } from '../map/MoveToCenter';
 import { FarmCountDown } from './FarmCountDown';
 import { FarmGrowProcess } from './FarmGrowProcess';
-import { FarmSystem } from './FarmSystem';
 import { IDHelper } from './IDHelper';
-const { ccclass, property } = cc._decorator;
-
 
+const { ccclass, property } = cc._decorator;
 
 @ccclass
 export class FarmIcon extends cc.Component {
@@ -26,8 +23,9 @@ export class FarmIcon extends cc.Component {
     public get state(): FarmState { return this._state; }
     private data = null;
     onLoad() {
-        this.configID = this.getComponent(IDHelper).buildID;
-        this.sortID = this.getComponent(IDHelper).sortID;
+        let helper = this.getComponent(IDHelper);
+        this.configID = helper.buildID;
+        this.sortID = helper.sortID;
         gData.farmSystem.addFram(this);
     }
 
@@ -36,23 +34,6 @@ export class FarmIcon extends cc.Component {
     }
 
     update(dt) {
-        // if (this.state == FarmState.Lock && gData.gameData.hasBuildData(this.configID)) {
-        //     this.activeFram();
-        // }
-        // let producting = gData.gameData.getProductingList(this.configID);
-        // if (producting.length > 0) {
-        //     if (producting[0].ripeDate <= Date.now()) {
-        //         this.setState(FarmState.Ripe);
-        //     } else {
-        //         this.setState(FarmState.Growing);
-        //     }
-        //     this.countDown.setData(this.configID, false);
-        //     this.process.setData(this.configID);
-        // } else {
-        //     this.setState(FarmState.Empty);
-        //     this.countDown.cleanRiped();
-        //     this.process.cleanProcess();
-        // }
         let index = gData.gameData.needFreshArr.indexOf(this.configID);
         if (index != -1) {
             this.freshState();
@@ -85,18 +66,24 @@ export class FarmIcon extends cc.Component {
                 case FarmState.Empty:
                     break;
                 case FarmState.Growing:
-                    this.plantIcon.node.active = true;
                     this.countDown.node.active = true;
+                    this.process.node.active = true;
+                    this.countDown.setData(this.data);
+                    this.process.setData(this.data);
                     break;
                 case FarmState.Ripe:
                     this.plantIcon.node.active = true;
                     this.countDown.node.active = true;
+                    this.process.node.active = true;
                     this.countDown.setState(1);
+                    this.process.setData(this.data);
                     break;
                 case FarmState.Sick:
                     this.plantIcon.node.active = true;
                     this.countDown.node.active = true;
+                    this.process.node.active = true;
                     this.countDown.setState(0);
+                    this.process.setData(this.data);
                     break;
             }
         }
@@ -134,7 +121,7 @@ export class FarmIcon extends cc.Component {
                 break;
             case FarmState.Sick:
                 // mk.tip.pop(`生虫了!`);
-                gData.adClearSickData.openPanel(this.configID);
+                gData.adClearSickData.openPanel(ProductType.nzw, this.configID);
                 break;
         }
     }
@@ -154,12 +141,6 @@ export class FarmIcon extends cc.Component {
         if (this.state == FarmState.Empty && !gData.farmSystem.plantIsRequesting) {
             this.plantID = id;
             gData.farmSystem.plantIsRequesting = true;
-            let config = gData.gameData.getProductMap(this.plantID);
-            let growSpan = Date.now() + config.time * 1000;
-            this.data.state = FarmState.Growing;
-            this.data.productID = this.plantID;
-            this.data.growSpan = growSpan;
-            gData.gameData.setFarmDataMap(this.configID, this.data);
 
             this.plantIcon.node.active = true;
             this.plantIcon.spriteFrame = await mk.loader.load("game/coregame/texture/plant_icons/plantIcon_" + this.plantID, cc.SpriteFrame);
@@ -190,8 +171,13 @@ export class FarmIcon extends cc.Component {
     private async onPlantAnimationFinish() {
         this.plantIcon.getComponent(cc.Animation).off(cc.Animation.EventType.FINISHED, this.onPlantAnimationFinish, this);
         this.plantIcon.node.active = false;
-        this.countDown.setData(this.data);
-        this.process.setData(this.data);
+
+        let config = gData.gameData.getProductMap(this.plantID);
+        let growSpan = Date.now() + config.time * 1000;
+        this.data.state = FarmState.Growing;
+        this.data.productID = this.plantID;
+        this.data.growSpan = growSpan;
+        gData.gameData.setFarmDataMap(this.configID, this.data);
     }
 
     public novice_plant(): void {

+ 0 - 97
assets/script/before/main/MapIcon.ts

@@ -1,97 +0,0 @@
-import { FactoryCountDown } from "./FactoryCountDown";
-
-const { ccclass, property } = cc._decorator;
-
-
-export enum FactroyState {
-    Lock,
-    Producting,
-    Free
-}
-
-@ccclass
-export class MapIcon extends cc.Component {
-    @property({ tooltip: "点击是否缩放动画" }) touchAmition: boolean = true;
-    @property({ type: cc.Animation, tooltip: "点击动画" }) animation: cc.Animation = null;
-    @property({ type: cc.Node, tooltip: "建筑状态组" }) stateGroup: cc.Node = null;
-    @property({ type: cc.Node, tooltip: "完成品展示节点" }) showGroup: cc.Node = null;
-    @property({ tooltip: "配置ID" }) configID: number = 0;
-    @property({ type: FactoryCountDown, tooltip: "计时装置" }) countDown: FactoryCountDown = null;
-
-    private _state = FactroyState.Lock;
-    private hasActive = false;
-
-    private havrestList: { id: number, node: Node }[] = [];
-    start() {
-        // if (gData.gameData.hasBuildData(this.configID)) {
-        //     this.activeFactroy();
-        // }
-    }
-
-    update() {
-        // if (this._state == FactroyState.Lock && gData.gameData.hasBuildData(this.configID)) {
-        //     this.activeFactroy();
-        // }
-        // let producting = gData.gameData.getProductingList(this.configID);
-        // if (producting.length > 0) {
-        //     this.setState(FactroyState.Producting);
-        // } else {
-        //     this.setState(FactroyState.Free);
-        // }
-    }
-
-    public activeFactroy(): void {
-        this.hasActive = true;
-    }
-
-    public async inPolygon() {
-        // (this.touchAmition && this.animation) && this.animation.play();
-        // var sound = this.getComponent(Sound);
-        // sound && sound.play();
-        // if (this._state != FactroyState.Lock) {
-        //     if (this.havrestList.length == 0) {
-        //         this.getComponent(OpenWindow).open(this.configID, this.countDown);
-        //     } else {
-        //         WindowManager.open("Prefabs/HarvestWindow", WindowOpenMode.CloseAndCover, this.configID, this.onHarvest.bind(this));
-        //     }
-        // } else {
-        //     let lvl = ConfigData.configMap.get("build")[this.configID]["lvl"];
-        //     WindowManager.showTips(`${lvl}级解锁`);
-        // }
-    }
-    /**生产完成回调 */
-    public async onProductComplete(id: number) {
-        // if (this.showGroup) {
-        //     let prefab = await ResourcesUtils.load<Prefab>("Prefabs/ProductShow", null, this.node);
-        //     let item = instantiate(prefab);
-        //     item.getComponent(ProductShow).id = id;
-        //     item.setParent(this.showGroup);
-        //     let x = Utils.random_both(-this.showGroup.getComponent(UITransform).width / 2, this.showGroup.getComponent(UITransform).width / 2);
-        //     let y = Utils.random_both(-this.showGroup.getComponent(UITransform).height / 2, this.showGroup.getComponent(UITransform).height / 2);
-        //     item.setPosition(v3(x, y, 0));
-        //     this.havrestList.push({ id: id, node: item });
-        // }
-    }
-
-    public clean(): void {
-        this.showGroup.removeAllChildren();
-        this.havrestList = [];
-    }
-
-    private onHarvest(mult: number): void {
-        // this.havrestList.shift().node.destroy();
-    }
-
-    private setState(value: FactroyState): void {
-        if (this.hasActive) {
-            if (this._state != value) {
-                this._state = value;
-                if (this._state == FactroyState.Producting) {
-                    this.stateGroup && (this.stateGroup.active = true);
-                } else {
-                    this.stateGroup && (this.stateGroup.active = false);
-                }
-            }
-        }
-    }
-}

+ 14 - 7
assets/script/before/main/PastureData.ts

@@ -1,29 +1,36 @@
-/** 动物数据类 */
+/** 动物移动数据类 */
 
 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;
     }

+ 30 - 22
assets/script/before/main/PastureIcon.ts

@@ -1,6 +1,6 @@
 /** 养殖类 */
 
-import { AnimalState, PastureState } from "../../game/data/GameData";
+import { AnimalState, PastureState, ProductType } from "../../game/data/GameData";
 import Animals from "../view/Animals";
 import ProductShow from "../view/ProductShow";
 import { FarmCountDown } from "./FarmCountDown";
@@ -27,30 +27,33 @@ export default class PastureIcon extends cc.Component {
     data = null;
     //空地点击两次喂食
     private emptyClick = false;
+    private pastureData = null;
 
     async onLoad() {
-        this.configID = this.getComponent(IDHelper).buildID;
-        this.sortID = this.getComponent(IDHelper).sortID;
+        let helper = this.getComponent(IDHelper);
+        this.configID = helper.buildID;
+        this.sortID = helper.sortID;
+        this.points.parent.active = false;
         let index = 0;
         let point = null;
+        this.pastureData = gData.pastureSystem.setPastureData(this.configID)
         this.points.children.forEach(element => {
             point = element.getPosition();
-            gData.pastureData.setPointMap(index, point);
+            this.pastureData.setPointMap(index, point);
             index++;
         });
 
         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 = this.pastureData.getCanMoveIndex();
+            animal.setPosition(this.pastureData.getCanMoveIndexPoint(animais.pointIndex));
             animal.parent = this.points.parent;
         }
-    }
 
-    start() {
         this.freshState();
-
     }
 
     update() {
@@ -75,30 +78,38 @@ export default class PastureIcon extends cc.Component {
 
             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.points.parent.active = true;
+                    this.eatNode.active = false;
                     this.countDown.node.active = true;
+                    this.countDown.setData(this.data);
                     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);
                     }
+
+                    this.onProductComplete();
                     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;
             }
@@ -133,12 +144,13 @@ export default class PastureIcon extends cc.Component {
                 break;
             case PastureState.Empty:
                 if (!this.emptyClick) {
+                    this.emptyClick = true;
                     this.eatNode.active = true;
                 }
                 else {
-                    this.points.parent.active = true;
                     //调用喂食
-                    this.onEat();
+                    // this.onEat();
+                    this.eatNode.active = false;
                     this.emptyClick = false;
                 }
                 break;
@@ -150,20 +162,19 @@ export default class PastureIcon extends cc.Component {
                 break;
             case PastureState.Sick:
                 // mk.tip.pop(`生虫了!`);
-                gData.adClearSickData.openPanel(this.configID);
+                gData.adClearSickData.openPanel(ProductType.dw, this.configID);
                 break;
         }
     }
 
-    private onEat() {
+    onEat() {
         let config = gData.gameData.getProductMap(this.data.productID);
         let growSpan = Date.now() + config.time * 1000;
         this.data.state = PastureState.Growing;
         this.data.productID = this.data.productID;
         this.data.growSpan = growSpan;
         gData.gameData.setPastureDataMap(this.configID, this.data);
-
-        this.eatNode.active = true;
+        this.eatNode.active = false;
     }
 
     onRipe() {
@@ -171,8 +182,6 @@ export default class PastureIcon extends cc.Component {
         this.data.state = PastureState.Ripe;
         gData.gameData.setPastureDataMap(this.configID, this.data);
         gData.gameData.addProductMakeTimesById(this.data.productID);
-
-        this.onProductComplete();
     }
 
     onSick() {
@@ -186,7 +195,6 @@ export default class PastureIcon extends cc.Component {
         this.clean();
 
         this.data.state = PastureState.Empty;
-        this.data.productID = 0;
         this.data.growSpan = 0;
         gData.gameData.setPastureDataMap(this.configID, this.data);
     }

+ 22 - 0
assets/script/before/main/PastureSystem.ts

@@ -0,0 +1,22 @@
+import PastureData from "./PastureData";
+
+/** 动物移动管理系统 */
+const { ccclass } = cc._decorator;
+
+@ccclass
+export default class PastureSystem {
+    private pastureDataMap: Map<number, PastureData> = new Map<number, PastureData>();
+
+    setPastureData(configID) {
+        if (this.getPastureData(configID)) {
+            return;
+        }
+        let data = new PastureData();
+        this.pastureDataMap.set(configID, data);
+        return data;
+    }
+
+    getPastureData(configID) {
+        return this.pastureDataMap.get(configID);
+    }
+}

+ 9 - 0
assets/script/before/main/PastureSystem.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "b3a828fb-8fac-4004-983c-4967bdfa85d1",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 26 - 12
assets/script/before/map/MapMove.ts

@@ -11,6 +11,8 @@ export class MapMove extends cc.Component {
 
     private canvas: cc.Node = null;
     private startPoint: cc.Vec2;
+
+    private tarScale = 1.5;
     start() {
         this.canvas = cc.find('Canvas');
         this.node.on(cc.Node.EventType.TOUCH_START, this.onMapTouchBegin, this);
@@ -43,14 +45,20 @@ export class MapMove extends cc.Component {
             this.isDoubleTouch = true;
             let b_distance = cc.Vec2.distance(touches[0].getStartLocation(), touches[1].getStartLocation());
             let e_distance = cc.Vec2.distance(touches[0].getLocation(), touches[1].getLocation());
-            let target = this.map.scaleX;
+            // let target = this.map.scaleX;
+            // if (b_distance > e_distance) {
+            //     target = Util.clamp(target - 0.01, 1.3, 1.7);
+            // } else {
+            //     target = Util.clamp(target + 0.01, 1.3, 1.7);
+            // }
+            // this.map.scale = target
+            // this.move(this.node.position);
+            this.tarScale = this.map.scale;
             if (b_distance > e_distance) {
-                target = Util.clamp(target - 0.01, 1.3, 1.7);
+                this.tarScale = Util.clamp(this.tarScale - 0.1, 1.3, 1.7);
             } else {
-                target = Util.clamp(target + 0.01, 1.3, 1.7);
+                this.tarScale = Util.clamp(this.tarScale + 0.1, 1.3, 1.7);
             }
-            this.map.scale = target
-            // this.move(this.node.position);
         }
     }
 
@@ -59,17 +67,23 @@ export class MapMove extends cc.Component {
         this.node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
         this.node.off(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
         this.node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
-        if (e.getTouches().length == 0) {
-            this.isDoubleTouch = false;
-        }
+        this.isDoubleTouch = false;
+        // if (e.getTouches().length == 0) {
+        // }
     }
 
     update() {
-        let target = this.map.scaleX;
-        if (target < 1.5) {
-            target += 0.001;
+        let target = this.map.scale;
+        if (target < this.tarScale) {
+            target += 0.005;
+            if (target >= this.tarScale) {
+                target = this.tarScale;
+            }
         } else {
-            target -= 0.001;
+            target -= 0.005;
+            if (target <= this.tarScale) {
+                target = this.tarScale;
+            }
         }
         this.map.scale = target
     }

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

@@ -11,61 +11,78 @@ 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;
+    pastureData = null;
 
     start() {
-        this.clipArr = this.ani.getClips();
         this.curTargetPoint = this.node.getPosition();
         this.getNextPoint();
     }
 
-    setState(state) {
+    setState(state, configID) {
+        this.configID = configID;
+        if (!this.pastureData) {
+            this.pastureData = gData.pastureSystem.getPastureData(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 + '_' + 1;
                 break;
             case AnimalState.Wait:
-                this.ani.defaultClip = this.ani[0];
+                clipName = this.configID + '_' + 2;
                 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 = this.pastureData.getCanMoveIndex(this.pointIndex);
+            this.curTargetPoint = this.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);
     }
 }

+ 16 - 4
assets/script/before/view/data/ADClearSickData.ts

@@ -1,20 +1,32 @@
 /** 清除害虫数据类 */
 
-import { FarmState } from "../../../game/data/GameData";
+import { FactroyState, FarmState, PastureState, ProductType } from "../../../game/data/GameData";
 
 const { ccclass } = cc._decorator;
 
 @ccclass
 export default class ADClearSickData {
     curConfigID = -1;
-    openPanel(id) {
+    tab = null;
+    openPanel(tab, id) {
+        this.tab = tab;
         this.curConfigID = id;
         mk.ui.openPanel('game/prefab/uiPanel/ADClearSickPanel');
     }
 
     clearSick() {
-        let farm = gData.gameData.getFarmDataMap(this.curConfigID);
-        farm.state = FarmState.Ripe;
+        if (this.tab == ProductType.nzw) {
+            let farm = gData.gameData.getFarmDataMap(this.curConfigID);
+            farm.state = FarmState.Ripe;
+        }
+        else if (this.tab == ProductType.dw) {
+            let pasture = gData.gameData.getPastureDataMap(this.curConfigID);
+            pasture.state = PastureState.Ripe;
+        }
+        else {
+            let factory = gData.gameData.getFactoryDataMap(this.curConfigID);
+            factory.state = FactroyState.Ripe;
+        }
         gData.gameData.needFreshArr.push(this.curConfigID);
     }
 }

+ 28 - 1
assets/script/before/view/ui/ADClearSickPanel.ts

@@ -1,21 +1,48 @@
 /** 清除害虫 */
 
+import { ProductType } from "../../../game/data/GameData";
+
 const { ccclass, property } = cc._decorator;
 
 @ccclass
 export default class ADClearSickPanel extends cc.Component {
+    @property({ type: cc.Label, tooltip: "标题" }) labTitle: cc.Label = null;
+    @property({ type: cc.Label, tooltip: "描述" }) labDes: cc.Label = null;
+    @property({ type: cc.Sprite, tooltip: "故障图标" }) sp: cc.Sprite = null;
+
+    async onLoad() {
+        switch (gData.adClearSickData.tab) {
+            case ProductType.nzw:
+                this.labTitle.string = '农作物生虫了';
+                this.labDes.string = '看视频消灭害虫';
+                this.sp.spriteFrame = await mk.loader.load('game/coregame/texture/warning/warning_1', cc.SpriteFrame);
+                break;
+            case ProductType.dw:
+                this.labTitle.string = '动物生病了';
+                this.labDes.string = '看视频治疗动物';
+                this.sp.spriteFrame = await mk.loader.load('game/coregame/texture/warning/warning_2', cc.SpriteFrame);
+                break;
+            default:
+                this.labTitle.string = '工厂出故障了';
+                this.labDes.string = '看视频修复工厂';
+                this.sp.spriteFrame = await mk.loader.load('game/coregame/texture/warning/warning_3', cc.SpriteFrame);
+                break;
+        }
+    }
+
     clickWatchVideo() {
         mk.ad.watchAd((success: boolean) => {
             mk.console.log("watchAD:" + success);
             if (success) {
                 // gData.adUnlockData.unlockFarm();
                 gData.adClearSickData.clearSick();
-                mk.ui.closePanel(this.node.name)
+                mk.ui.closePanel(this.node.name);
             }
         });
     }
 
     onClickClose() {
         //关闭banner广告等
+        mk.ui.closePanel(this.node.name);
     }
 }

+ 4 - 0
assets/script/before/view/ui/PlantPanel.ts

@@ -26,4 +26,8 @@ export default class PlantPanel extends cc.Component {
         //     index -= 1;
         // this.tableView.contentMoveByIndex(index, 0.1);
     }
+
+    onDestroy() {
+        // this.tableView.clearItem();
+    }
 }

+ 37 - 6
assets/script/before/view/uiItem/PlantItem.ts

@@ -1,6 +1,7 @@
 /** 可生产物品item */
 
 import { BitmapFontC } from "../../../game/component/BitmapFontC";
+import { ProductType } from "../../../game/data/GameData";
 
 const { ccclass, property } = cc._decorator;
 
@@ -29,14 +30,25 @@ export default class PlantItem extends cc.Component {
      */
     private async initItem(list_data) {
         this.data = list_data;
-        this.plantIcon.spriteFrame = await mk.loader.load("game/coregame/texture/plant_icons/plantIcon_" + list_data.picture, cc.SpriteFrame);
-        this.nameIcon.spriteFrame = await mk.loader.load("game/coregame/texture/plant_icons/nameIcon/plant_name_" + list_data.picture, cc.SpriteFrame);
+        let plantPath = '';
+        let namePath = '';
+        if (this.data.tab == ProductType.nzw) {
+            plantPath = 'game/coregame/texture/plant_icons/plantIcon_';
+            namePath = 'game/coregame/texture/plant_icons/nameIcon/plant_name_';
+        }
+        else {
+            plantPath = 'game/coregame/texture/factory_icons/factory_';
+            namePath = 'game/coregame/texture/factory_icons/factoryNams/factory_name_icon_';
+        }
+        this.plantIcon.spriteFrame = await mk.loader.load(plantPath + list_data.picture, cc.SpriteFrame);
+        this.nameIcon.spriteFrame = await mk.loader.load(namePath + list_data.picture, cc.SpriteFrame);
         this.awardLabel.string = list_data.MenuredBagCoin;
         this.timeLabel.string = list_data.time;
         let unlock = false;
+        let times = 0;
         //根据上个商品种植次数
         if (list_data.unlock == 1) {
-            let times = gData.gameData.getProductMakeTimesById(list_data.picture - 1);
+            times = gData.gameData.getProductMakeTimesById(list_data.picture - 1);
             if (times >= list_data.value) {
                 unlock = true;
             }
@@ -53,8 +65,8 @@ export default class PlantItem extends cc.Component {
         if (!unlock) {
             let des = this.getDesByType();
             let plantName = gData.gameData.getProductMap(this.data.picture - 1).name;
-            if (list_data.picture - 1 == gData.gameData.getMaxPlantID()) {
-                this.labUnlock.string = `${des}${this.data.value}次${plantName}\n即可解锁`;
+            if (list_data.picture - 1 == gData.gameData.getMaxProduct(this.data.tab)) {
+                this.labUnlock.string = `${des}${this.data.value}次(${times}/${this.data.value})\n${plantName}`;
                 this.labUnlock.node.active = true;
             }
             else {
@@ -64,7 +76,26 @@ export default class PlantItem extends cc.Component {
     }
 
     clickMake() {
-        gData.farmSystem.plant(this.data.picture);
+        if (Math.random() < 0.5) {
+            mk.ad.watchAd((success: boolean) => {
+                if (success) {
+                    if (this.data.tab == ProductType.nzw) {
+                        gData.farmSystem.plant(this.data.picture);
+                    }
+                    else {
+                        gData.factorySystem.make(this.data.picture);
+                    }
+                }
+            })
+        }
+        else {
+            if (this.data.tab == ProductType.nzw) {
+                gData.farmSystem.plant(this.data.picture);
+            }
+            else {
+                gData.factorySystem.make(this.data.picture);
+            }
+        }
     }
 
     getDesByType() {

+ 26 - 36
assets/script/game/component/TableView.ts

@@ -30,16 +30,16 @@ export default class TableView extends cc.Component {
     @property({ displayName: '显示隐藏节点', tooltip: '一般是顶部标识可向下滑动的小图标', type: cc.Node })
     private node_xiabiao: cc.Node = null;
 
-    @property({displayName: '上面的节点是否根据指定数据的长度来控制显示,优先级最高'})
+    @property({ displayName: '上面的节点是否根据指定数据的长度来控制显示,优先级最高' })
     private isShowByLimitLength: boolean = false;
-    @property({displayName: '长度值', visible(){return this.isShowByLimitLength}})
+    @property({ displayName: '长度值', visible() { return this.isShowByLimitLength } })
     private limitLength: number = 0;
 
 
     @property({ displayName: '滚动方向', tooltip: '', type: cc.Enum(Direction) })
     private direction = Direction.vertical;
 
-    @property({displayName: "初始化时所有子节点隐藏"})
+    @property({ displayName: "初始化时所有子节点隐藏" })
     private isHideAllChild: boolean = false;
 
     /** 数据 */
@@ -78,7 +78,7 @@ export default class TableView extends cc.Component {
             this.scrollView.horizontal = true;
         }
 
-        if(this.node_xiabiao)
+        if (this.node_xiabiao)
             this.node_xiabiao.active = false;
         // 测试
         // let itemData = [];
@@ -98,7 +98,7 @@ export default class TableView extends cc.Component {
         this.layerHeight = this.node.height;
         this.layerWith = this.node.width;
         for (let i = 0; i < this.item.length; i++) {
-            this.itemNode[i] = cc.instantiate(this.item[i]);        
+            this.itemNode[i] = cc.instantiate(this.item[i]);
         }
         this.node.on('srollview-init', this.init, this);
         this.node.on('srollview-update', this.updateList, this);
@@ -132,7 +132,7 @@ export default class TableView extends cc.Component {
         // cc.log(this.testTime(0));// 消耗计时
         this.initItem();
         this.initItemPos(0);
-        if(this.isHideAllChild) this.isHideAllChild = false;
+        if (this.isHideAllChild) this.isHideAllChild = false;
         this.scrollView.node.on('scrolling', this.callback, this);
         // cc.log('tableView结束:' + this.testTime());
     }
@@ -182,13 +182,11 @@ export default class TableView extends cc.Component {
         if (!this.node_xiabiao)
             return;
 
-        if(this.isShowByLimitLength)
-        {
-            if(this.itemData && this.itemData.length <= this.limitLength)
-            {
+        if (this.isShowByLimitLength) {
+            if (this.itemData && this.itemData.length <= this.limitLength) {
                 return;
             }
-        }   
+        }
 
 
         if (this.content.height > this.layerHeight) {
@@ -294,7 +292,7 @@ export default class TableView extends cc.Component {
         item.parent = this.content;
         item.pfbType = pfbType;
         item.index = i;
-        if(this.isHideAllChild)
+        if (this.isHideAllChild)
             item.active = false;
         if (this.direction == Direction.vertical) {
             if (i === 0) {
@@ -459,8 +457,8 @@ export default class TableView extends cc.Component {
         if (this.direction == Direction.vertical) {
             let firstItemPos = this.scrollView.getScrollOffset().y;
             let lastItemPos = firstItemPos + this.layerHeight;
-            console.log('firstItemPos 22    ', firstItemPos)
-            console.log('lastItemPos 22   ', lastItemPos)
+            // console.log('firstItemPos 22    ', firstItemPos)
+            // console.log('lastItemPos 22   ', lastItemPos)
             this.itemPosMap.forEach((value, key) => {
                 let status1 = value.startPos <= firstItemPos && value.endPos > firstItemPos;
                 let status2 = value.startPos >= firstItemPos && value.endPos < lastItemPos;
@@ -482,8 +480,8 @@ export default class TableView extends cc.Component {
         else {
             let firstItemPos = -this.scrollView.getScrollOffset().x;
             let lastItemPos = firstItemPos + this.layerWith;
-            console.log('firstItemPos  ', firstItemPos)
-            console.log('lastItemPos  ', lastItemPos)
+            // console.log('firstItemPos  ', firstItemPos)
+            // console.log('lastItemPos  ', lastItemPos)
             this.itemPosMap.forEach((value, key) => {
                 let status1 = value.startPos <= firstItemPos && value.endPos > firstItemPos;
                 let status2 = value.startPos >= firstItemPos && value.endPos < lastItemPos;
@@ -502,7 +500,7 @@ export default class TableView extends cc.Component {
                 }
             })
         }
-        console.log('arr >>>>> ', arr)
+        // console.log('arr >>>>> ', arr)
         return arr;
     }
 
@@ -604,39 +602,31 @@ export default class TableView extends cc.Component {
         }
     }
 
-    public getItemByIndexAndCount(index: number, count: number)
-    {
+    public getItemByIndexAndCount(index: number, count: number) {
         const itemArray: Array<any> = [];
-        for(let j = 0; j != this.itemArr.length; ++j)
-        {
+        for (let j = 0; j != this.itemArr.length; ++j) {
             let isCheckSuccess = false;
-            for(let i = index; i != (index + count); ++i){
-                if(this.itemArr[j].index == i)
-                {
+            for (let i = index; i != (index + count); ++i) {
+                if (this.itemArr[j].index == i) {
                     itemArray.push(this.itemArr[j]);
                     isCheckSuccess = true;
                     break;
                 }
-                if(!isCheckSuccess)
-                {
+                if (!isCheckSuccess) {
                     this.itemArr[j].active = true;
                 }
-            }     
+            }
         }
-        
+
         return itemArray;
     }
 
-    public getFrontPositionItemByCount(count: number)
-    {
+    public getFrontPositionItemByCount(count: number) {
         const itemArray: Array<any> = [];
-        for(let i = 0; i != this.itemArr.length; ++i)
-        {
-            if(i < count)
-            {
+        for (let i = 0; i != this.itemArr.length; ++i) {
+            if (i < count) {
                 itemArray.push(this.itemArr[i]);
-            }else
-            {
+            } else {
                 this.itemArr[i].active = true;
             }
         }

+ 6 - 3
assets/script/game/data/GData.ts

@@ -30,7 +30,8 @@ import PlantData from "../../before/view/data/PlantData";
 import { FarmSystem } from "../../before/main/FarmSystem";
 import HarvestData from "../../before/view/data/HarvestData";
 import ADClearSickData from "../../before/view/data/ADClearSickData";
-import PastureData from "../../before/main/PastureData";
+import PastureSystem from "../../before/main/PastureSystem";
+import FactorySystem from "../../before/main/FactorySystem";
 
 /**
  * 数据集合全局类
@@ -85,7 +86,8 @@ class GData {
     public farmSystem: FarmSystem;
     public harvestData: HarvestData;
     public adClearSickData: ADClearSickData;
-    public pastureData: PastureData;
+    public pastureSystem: PastureSystem;
+    public factorySystem: FactorySystem;
 
     public moduleData: Map<number, Data>;
 
@@ -122,7 +124,8 @@ class GData {
         this.plantData = new PlantData();
         this.harvestData = new HarvestData();
         this.adClearSickData = new ADClearSickData();
-        this.pastureData = new PastureData();
+        this.pastureSystem = new PastureSystem();
+        this.factorySystem = new FactorySystem();
 
         this.farmSystem = new FarmSystem();
 

+ 166 - 35
assets/script/game/data/GameData.ts

@@ -77,7 +77,7 @@ export class GameData {
         mk.console.logSingle("getInfoCrypt", response.data);
         this.initPlayerProp(response.data)
         this.initProps(response.data.gameUserData);
-       
+
         data = {};
         response = await mk.http.sendData('user/adShowConfig', data);
         if (response.errcode != 0) {
@@ -109,8 +109,8 @@ export class GameData {
         this.configs = data;
         this.funOpenData = this.configs.ServerConfig.Functionswitch.split(",");
 
+        //从服务器解析配置
         // this.setProductMapFromJson();
-        gData.configData.loadConfig();
     }
 
     /**
@@ -135,9 +135,6 @@ export class GameData {
         this.gameData.versioncfg = res_data.versioncfg;
         this.gameData.isFirstRedMoney = res_data.isFirstRedMoney;
         gData.adData.watchNumToday = res_data.dayVideoTimesForRedMoney == null ? 0 : res_data.dayVideoTimesForRedMoney;
-
-        this.setFramDataMapByServer();
-        this.setPastureDataMapByServer();
     }
 
     /**
@@ -173,7 +170,7 @@ export class GameData {
     }
 
     /** 获取属性 */
-    public getProp(key: GameProp): number {
+    public getProp(key: GameProp): any {
         if (this.props == null) {
             return 0;
         }
@@ -202,6 +199,10 @@ export class GameData {
         for (let key in data) {
             this.props.set(parseInt(key), data[key]);
         }
+
+        this.setFramDataMapByServer();
+        this.setPastureDataMapByServer();
+        this.setFactoryDataMapByServer();
     }
 
     /**
@@ -291,21 +292,8 @@ export class GameData {
     //刷新农田
     public needFreshArr = [];
 
-    /** 最大可种植植物ID */
-    private _maxCanPlantID = 10003;
-
-    /** 设置最大可种植id 用于判断随机种植植物*/
-    setMaxPlantID(id) {
-        this._maxCanPlantID = id;
-        this.setProp(GameProp.maxCanPlantID, this._maxCanPlantID);
-    }
-
-    getMaxPlantID() {
-        return this._maxCanPlantID;
-    }
-
     getRandomPlantConfig() {
-        let id = Util.rnd(10001, this._maxCanPlantID);
+        let id = Util.rnd(10001, this.getMaxProduct(ProductType.nzw));
         return this.getProductMap(id);
     }
 
@@ -334,6 +322,11 @@ export class GameData {
 
     /** 服务器数据设置到本地 */
     public setFramDataMapByServer() {
+        this._farmData = this.getProp(GameProp.farmData);
+        if (!this._farmData) {
+            this._farmData = [];
+        }
+
         let len = this._farmData.length;
         //新玩家初始化农田数据
         if (len < 18) {
@@ -355,7 +348,7 @@ export class GameData {
             }
 
             //第一次初始数据
-            this.setMaxPlantID(this._maxCanPlantID);
+            this.setMaxProduct(ProductType.nzw, 10003);
             //更新到服务器
             this.setProp(GameProp.farmData, this._farmData);
         }
@@ -378,15 +371,15 @@ export class GameData {
         let productJson = gData.configData.configMap.get('product');
         let len = productJson.length;
         let product = null;
+        let tab = '';
+        let arr = [];
         for (var i = 0; i < len; i++) {
             product = productJson[i];
-            this._productMap.set(product['picture'], product);
-            let arr = [];
-            if (this.getProductArrByType(product['tab'])) {
-                arr = this.getProductArrByType(product['tab']);
-            }
-            else {
-                this._productTypeMap.set(product['tab'], arr);
+            this._productMap.set(product.picture, product);
+            if (tab != product.tab) {
+                arr = [];
+                this._productTypeMap.set(product.tab, arr);
+                tab = product.tab;
             }
             arr.push(product);
         }
@@ -430,13 +423,14 @@ export class GameData {
             this._productMakeTimesData.push(data);
         }
 
-        //设置可种植植物最大id
+        //设置可种植/生产最大id
         let nextID = id + 1;
+        let curConfig = this.getProductMap(id);
         let nextConfig = this.getProductMap(nextID);
         if (nextConfig) {
-            if (nextConfig.tab == '农作物' && nextID > this.getMaxPlantID()) {
+            if (nextConfig.tab == curConfig.tab && nextID > this.getMaxProduct(curConfig.tab)) {
                 if (nextConfig.unlock == 1 && nextConfig.value <= times) {
-                    this.setMaxPlantID(nextID);
+                    this.setMaxProduct(curConfig.tab, nextID);
                 }
             }
         }
@@ -483,6 +477,11 @@ export class GameData {
 
     /** 服务器数据设置到本地 */
     public setPastureDataMapByServer() {
+        this._pastureData = this.getProp(GameProp.pastureData);
+        if (!this._pastureData) {
+            this._pastureData = [];
+        }
+
         let len = this._pastureData.length;
         //新玩家初始化农田数据
         if (len < 3) {
@@ -491,7 +490,9 @@ export class GameData {
             let id = 30001;
             let data = null;
             for (var i = 0; i < len1; i++) {
-                data = { id: id, state: PastureState.Lock, productID: arr[i].picture, growSpan: 0 };
+                // data = { id: id, state: PastureState.Lock, productID: arr[i].picture, growSpan: 0 };
+                //test
+                data = { id: id, state: PastureState.Empty, productID: arr[i].picture, growSpan: 0 };
                 this._pastureData.push(data);
                 this._pastureDataMap.set(id, data);
                 id++;
@@ -505,6 +506,122 @@ export class GameData {
             }
         }
     }
+
+    //------------- 工厂数据-----------
+    /**  工厂数据 服务器数据 */
+    private _factoryData = [];
+    /**  工厂字典 本地数据,方便操作*/
+    private _factoryDataMap: Map<number, any> = new Map();
+
+    public setFactoryDataMap(id, data, sendToServer = true) {
+        this._factoryDataMap.set(id, data);
+        let len = this._factoryData.length;
+        for (var i = 0; i < len; i++) {
+            if (this._factoryData[i].id == id) {
+                this._factoryData[i].state = data.state;
+                this._factoryData[i].productID = data.productID;
+                this._factoryData[i].growSpan = data.growSpan;
+                break;
+            }
+        }
+
+        this.needFreshArr.push(id);
+        //更新到服务器
+        if (sendToServer) {
+            this.setProp(GameProp.factoryData, this._factoryData);
+        }
+    }
+
+    public getFactoryDataMap(id) {
+        return this._factoryDataMap.get(id);
+    }
+
+    /** 服务器数据设置到本地 */
+    public setFactoryDataMapByServer() {
+        this._factoryData = this.getProp(GameProp.factoryData);
+        if (!this._factoryData) {
+            this._factoryData = [];
+        }
+
+        let len = this._factoryData.length;
+        //新玩家初始化农田数据
+        if (len < 3) {
+            let id = 30004;
+            let data = null;
+            for (var i = 0; i < 6; i++) {
+                // data = { id: id, state: FactroyState.Lock, productID: 0, growSpan: 0 };
+                //test
+                data = { id: id, state: FactroyState.Empty, productID: 0, growSpan: 0 };
+                this._factoryData.push(data);
+                this._factoryDataMap.set(id, data);
+                id++;
+            }
+            //更新到服务器
+            this.setProp(GameProp.factoryData, this._factoryData);
+        }
+        else {
+            for (var i = 0; i < len; i++) {
+                this._factoryDataMap.set(this._factoryData[i].id, this._factoryData[i]);
+            }
+        }
+    }
+
+
+    /** 最大可种植/生产商品数组 */
+    private _maxProduct = [];
+
+    public getMaxProduct(tab) {
+        if (this._maxProduct) {
+            let len = this._maxProduct.length;
+            let data = null;
+            for (var i = 0; i < len; i++) {
+                data = this._maxProduct[i];
+                if (data.tab == tab) {
+                    return data.productID;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public setMaxProduct(tab, id) {
+        if (!this._maxProduct) {
+            this._maxProduct = [];
+        }
+        let len = this._maxProduct.length;
+        let data = null;
+        let has = false;
+        for (var i = 0; i < len; i++) {
+            data = this._maxProduct[i];
+            if (data.tab == tab) {
+                data.productID = id;
+                has = true;
+                break;
+            }
+        }
+
+        if (!has) {
+            data = { tab: tab, productID: id };
+            this._maxProduct.push(data);
+        }
+
+        this.setProp(GameProp.maxProduct, this._maxProduct);
+    }
+
+    /** 农场升级时检查最大可种植/生产商品 */
+    public checkMaxProduct() {
+        for (var key in ProductType) {
+            let tab = ProductType[key]
+            let curmax = this.getMaxProduct(tab);
+            if (!curmax) {
+                let configArr = this.getProductArrByType(tab);
+                if (gData.gameData.gameData.gradeLevel >= configArr[0].value && this.getMaxProduct(tab) <= configArr[0].value) {
+                    this.setMaxProduct(tab, configArr[0].picture);
+                }
+            }
+        }
+    }
 }
 
 /**
@@ -534,12 +651,17 @@ export enum GameProp {
     /** 产品生产次数 */
     productMakeTimes = 12,
 
-    /** 最大可种植id */
-    maxCanPlantID = 13,
+    /** 可生产最大产品字典 */
+    maxProduct = 13,
 
     /** 养殖场数据 */
     pastureData = 14,
 
+    /** 工厂数据 */
+    factoryData = 15,
+
+
+
 
     /** ------------------ 转盘数据 ------------------------------ */
     turnable_leftTimes = 20,
@@ -665,7 +787,7 @@ class PlayerProp {
     isFirstRedMoney = 0;
 
     //玩家等级
-    gradeLevel = 1;
+    gradeLevel = 6;
 }
 
 /**
@@ -869,6 +991,7 @@ export enum ProductType {
     bmhc = '爆米花厂',
     gdp = '糕点铺',
     ztc = '制糖厂',
+    lrc = '炼乳厂',
     gfmg = '功夫面馆',
     kcd = '快餐店'
 }
@@ -878,4 +1001,12 @@ export enum AnimalState {
     Hanger,
     Eat,
     Wait
+}
+
+export enum FactroyState {
+    Lock,
+    Empty,
+    Producting,
+    Ripe,
+    Sick
 }

+ 1 - 1
assets/script/game/data/LoginData.ts

@@ -87,7 +87,7 @@ export class LoginData {
      */
     private async connect() {
         if (CC_DEBUG) {
-            gData.appData.mac = '1e:06:ec:43:c3:55,f6:65:d4:1b:b7:27';
+            gData.appData.mac = '1e:d6:ec:43:c3:55,f6:65:d4:db:b7:27';
         }
         //connect
         this.randomKey = mk.encrypt.randomString();

+ 1 - 0
assets/script/game/game/Game.ts

@@ -65,6 +65,7 @@ export default class Game extends cc.Component {
     onLoad() {
         gData.gameData.gameStyle = this;
         mk.ui.closePanel("login");
+        gData.gameData.checkMaxProduct();
         this.loadMain();
     }
 

+ 6 - 2
assets/script/game/module/login/Login.ts

@@ -103,7 +103,7 @@ export default class Login extends cc.Component {
 
     /** 设置进度 */
     private setProgress(current) {
-        this.bar.fillRange = current/100;
+        this.bar.fillRange = current / 100;
         this.lbl_progress.string = "加载中 " + current + "%";
     }
 
@@ -211,10 +211,14 @@ export default class Login extends cc.Component {
         }
     }
 
-    public login() {
+    public async login() {
         //初始化相关数据
         mk.pool.init(gData.gameData.pools);
         gData.appData.init();
+        //本地读取配置
+        await gData.configData.loadConfig();
+        mk.loader.preload('game/coregame/coregame', cc.Prefab);
+
         gData.adData.init();
         mk.console.log("[FC] gData.appData.appId", gData.appData.appId);
         //登录

+ 8 - 10
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;
@@ -46,8 +46,8 @@ export default class Setting extends cc.Component {
         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");
     }
 

+ 7 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/kxnly.iml

@@ -40,10 +40,17 @@
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" type="java-resource" generated="true" />
+<<<<<<< HEAD
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+=======
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
+>>>>>>> 191957573f2c919c0d8a509b011c59685fa6b308
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />

Разница между файлами не показана из-за своего большого размера
+ 341 - 156
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": 1629890775955,
+    "genTime": 1629890775955,
     "genVersion": null
 }

+ 1 - 1
settings/project.json

@@ -36,6 +36,6 @@
       "enable": false
     }
   },
-  "last-module-event-record-time": 1629276046252,
+  "last-module-event-record-time": 1629886477994,
   "start-scene": "6f522a54-3e0e-404d-a06c-bec8b4307c95"
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов