Explorar el Código

农田相关功能修改
养猪场功能初步增加

kaka hace 4 años
padre
commit
44b40bdac5
Se han modificado 28 ficheros con 7448 adiciones y 390 borrados
  1. 5227 252
      assets/resources/game/coregame/coregame.prefab
  2. 12 0
      assets/resources/game/coregame/texture/pasture.meta
  3. BIN
      assets/resources/game/coregame/texture/pasture/pasture_feedbg.png
  4. 36 0
      assets/resources/game/coregame/texture/pasture/pasture_feedbg.png.meta
  5. BIN
      assets/resources/game/coregame/texture/pasture/pasture_feedbg2.png
  6. 36 0
      assets/resources/game/coregame/texture/pasture/pasture_feedbg2.png.meta
  7. 1 1
      assets/resources/game/coregame/texture/warning/warning_1.png.meta
  8. 1306 0
      assets/resources/game/prefab/uiPanel/ADClearSickPanel.prefab
  9. 8 0
      assets/resources/game/prefab/uiPanel/ADClearSickPanel.prefab.meta
  10. 1 1
      assets/resources/game/texture/main/icon5.png.meta
  11. 2 2
      assets/resources/game/texture/main/schedule.png.meta
  12. 2 2
      assets/resources/module/login/texture/old/launchLogo.png.meta
  13. 23 1
      assets/script/before/main/FarmCountDown.ts
  14. 9 1
      assets/script/before/main/FarmIcon.ts
  15. 2 57
      assets/script/before/main/FarmSystem.ts
  16. 140 0
      assets/script/before/main/PastureIcon.ts
  17. 9 0
      assets/script/before/main/PastureIcon.ts.meta
  18. 20 0
      assets/script/before/view/data/ADClearSickData.ts
  19. 9 0
      assets/script/before/view/data/ADClearSickData.ts.meta
  20. 21 0
      assets/script/before/view/ui/ADClearSickPanel.ts
  21. 9 0
      assets/script/before/view/ui/ADClearSickPanel.ts.meta
  22. 1 0
      assets/script/before/view/ui/ADUnlockPanel.ts
  23. 3 0
      assets/script/game/data/GData.ts
  24. 65 1
      assets/script/game/data/GameData.ts
  25. 3 3
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/1786486690/libcocos2dx.iml
  26. 2 2
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/kxnly.iml
  27. 499 65
      build/jsb-link/js backups (useful for debugging)/main.index.js
  28. 2 2
      packages-hot-update/cfg.json

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 5227 - 252
assets/resources/game/coregame/coregame.prefab


+ 12 - 0
assets/resources/game/coregame/texture/pasture.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "4e37dc49-5037-4c53-9cda-3b0011f90ad1",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

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


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

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "871d8f9b-f514-4afd-90c3-83c64c734fa3",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 218,
+  "height": 174,
+  "platformSettings": {},
+  "subMetas": {
+    "pasture_feedbg": {
+      "ver": "1.0.4",
+      "uuid": "871d8f9b-f514-4afd-90c3-83c64c734fa3@6c48a",
+      "rawTextureUuid": "871d8f9b-f514-4afd-90c3-83c64c734fa3",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 218,
+      "height": 174,
+      "rawWidth": 218,
+      "rawHeight": 174,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

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


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

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "4963896e-d685-472a-b91a-1637d3549703",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 89,
+  "height": 54,
+  "platformSettings": {},
+  "subMetas": {
+    "pasture_feedbg2": {
+      "ver": "1.0.4",
+      "uuid": "4963896e-d685-472a-b91a-1637d3549703@6c48a",
+      "rawTextureUuid": "4963896e-d685-472a-b91a-1637d3549703",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -1,
+      "offsetY": -1,
+      "trimX": 0,
+      "trimY": 2,
+      "width": 87,
+      "height": 52,
+      "rawWidth": 89,
+      "rawHeight": 54,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 1 - 1
assets/resources/game/coregame/texture/warning/warning_1.png.meta

@@ -13,7 +13,7 @@
   "subMetas": {
     "warning_1": {
       "ver": "1.0.4",
-      "uuid": "82be5d5e-37d5-496c-a92a-2067f66cb75e",
+      "uuid": "81dc1718-56ca-4c79-a39f-c75e2a2bcac1",
       "rawTextureUuid": "d375929b-48b6-4f7b-8ed3-c6ab996f8f92",
       "trimType": "auto",
       "trimThreshold": 1,

+ 1306 - 0
assets/resources/game/prefab/uiPanel/ADClearSickPanel.prefab

@@ -0,0 +1,1306 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "ADClearSickPanel",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 33
+      },
+      {
+        "__id__": 34
+      },
+      {
+        "__id__": 36
+      },
+      {
+        "__id__": 37
+      }
+    ],
+    "_prefab": {
+      "__id__": 38
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        375,
+        667,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "背景",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 31
+      }
+    ],
+    "_prefab": {
+      "__id__": 32
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 588,
+      "height": 679
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "closeButton",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 4
+      },
+      {
+        "__id__": 5
+      }
+    ],
+    "_prefab": {
+      "__id__": 6
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 81,
+      "height": 86
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        247.237,
+        299.119,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "194df592-3d3d-4882-bedd-c7e2f9cbcdca@6c48a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cdc50kCRVVBa5gcp4XXxVO+",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": true,
+    "node_panel": {
+      "__id__": 1
+    },
+    "transition_type": 0,
+    "onComplete": [],
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "d51AnIYsZPJbidnSPNRmok",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "labDes",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 139,
+      "g": 69,
+      "b": 19,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 180,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        218,
+        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__": 7
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "农作物生虫了",
+    "_N$string": "农作物生虫了",
+    "_fontSize": 30,
+    "_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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "d9nwuu0DhKSpmvY/TO8c7F",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "立即获得文本",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 11
+      },
+      {
+        "__id__": 12
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 210,
+      "g": 105,
+      "b": 30,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 226,
+      "height": 52.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -37.496,
+        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__": 10
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "看视频消灭害虫",
+    "_N$string": "看视频消灭害虫",
+    "_fontSize": 32,
+    "_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__": 10
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_width": 1,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "ddSQ74FeJEup0WTAWWJRIT",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg_prize",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 18
+      }
+    ],
+    "_prefab": {
+      "__id__": 19
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 104,
+      "height": 104
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        71.204,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "farm",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 14
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 16
+      }
+    ],
+    "_prefab": {
+      "__id__": 17
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 58,
+      "height": 30
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1.8,
+        1.8,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 15
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "81dc1718-56ca-4c79-a39f-c75e2a2bcac1"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "e5SRX7NeVNRoyfK9MpG5OZ",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "fc7a5703-4208-41e0-8ee0-269d6b7d4a74@6c48a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "52ko4RmPpFLbkAVKNpjMzg",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "立即领取",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 21
+      },
+      {
+        "__id__": 24
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 27
+      },
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": {
+      "__id__": 30
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 279,
+      "height": 109
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -181.997,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "video_icon",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 22
+      }
+    ],
+    "_prefab": {
+      "__id__": 23
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 71,
+      "height": 68
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -133.775,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1.2,
+        1.2,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 21
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "b7c2b0ee-ffff-4822-add8-18fb1b55161c@6c48a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "d4HZGJhpFN6bd8Q7Nizc6Y",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "add_window_btn_byte_0",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 25
+      }
+    ],
+    "_prefab": {
+      "__id__": 26
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 139,
+      "height": 37
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 24
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "599485e0-1c8e-4e85-bd06-3d33b766c276"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "54zWyrFTRAmJ/n9XmM6LRb",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "b0441a04-95a8-4264-bc52-3881bbf09462@6c48a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 29
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 0,
+    "transition": 0,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "0c4f2VNCqNOEaoWvFRThSJc",
+    "handler": "clickWatchVideo",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "326K1Yi95AR508UoqaGQ4z",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "898d164f-4a0f-4d44-9065-0c70f936ae02@6c48a"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "7atPS97ydBcp1QTAX+e6zf",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 750,
+    "_originalHeight": 1334,
+    "_id": ""
+  },
+  {
+    "__type__": "58495/rJOBNGoxELFSp8G2a",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 180
+    },
+    "design_block_node": null,
+    "bClickClose": true,
+    "onComplete": [
+      {
+        "__id__": 35
+      }
+    ],
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "0c4f2VNCqNOEaoWvFRThSJc",
+    "handler": "onClickClose",
+    "customEventData": ""
+  },
+  {
+    "__type__": "0c4f2VNCqNOEaoWvFRThSJc",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "ac053zwqaRD6IJmTlQWmefZ",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "effect_par": {
+      "__id__": 2
+    },
+    "open_effect": 1,
+    "isOpenCloseEffect": true,
+    "close_effect": 1,
+    "close_toPoint": "",
+    "close_uibg": false,
+    "isDelayOneFrame": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9"
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 8 - 0
assets/resources/game/prefab/uiPanel/ADClearSickPanel.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.9",
+  "uuid": "f5c0b09e-7ed9-41a5-aa98-47b18e3423f9",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 1 - 1
assets/resources/game/texture/main/icon5.png.meta

@@ -8,7 +8,7 @@
   "genMipmaps": false,
   "packable": true,
   "width": 181,
-  "height": 125,
+  "height": 126,
   "platformSettings": {},
   "subMetas": {
     "icon5": {

+ 2 - 2
assets/resources/game/texture/main/schedule.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 114,
-  "height": 20,
+  "width": 109,
+  "height": 17,
   "platformSettings": {},
   "subMetas": {
     "schedule": {

+ 2 - 2
assets/resources/module/login/texture/old/launchLogo.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 512,
-  "height": 512,
+  "width": 365,
+  "height": 256,
   "platformSettings": {},
   "subMetas": {
     "launchLogo": {

+ 23 - 1
assets/script/before/main/FarmCountDown.ts

@@ -20,6 +20,8 @@ export class FarmCountDown extends cc.Component {
     /**总时长 */
     private totleTime = 0;
     private isDataed = false;
+
+    private isRipeInit = false;
     public async setData(data) {
         if (!this.isDataed) {
             this.isDataed = true;
@@ -41,11 +43,15 @@ export class FarmCountDown extends cc.Component {
             this.normalCount.string = timeString;
             this.normalProgress.progress = 1 - ((this.ripeTime - now) / (this.totleTime * 1000));
         } else if (this.counting && now > this.ripeTime) {
-            this.riped();
+            if (!this.isRipeInit) {
+                this.isRipeInit = true;
+                this.riped();
+            }
         }
     }
 
     public cleanRiped(): void {
+        this.isRipeInit = false;
         this.isDataed = false;
         this.ripedIcon.active = false;
         this.sickIcon.active = false;
@@ -67,6 +73,22 @@ export class FarmCountDown extends cc.Component {
         // WindowManager.showTips("钻石不足");
     }
 
+    /** 设置显示
+     * @param state 0 生虫 1 成熟
+     */
+    setState(state) {
+        this.normalProgress.progress = 0;
+        this.normalCount.string = '';
+        if (state == 0) {
+            this.sickIcon.active = true;
+            this.ripedIcon.active = false;
+        }
+        else if (state == 1) {
+            this.sickIcon.active = false;
+            this.ripedIcon.active = true;
+        }
+    }
+
     private riped(): void {
         this.counting = false;
         this.normalGroup.active = false;

+ 9 - 1
assets/script/before/main/FarmIcon.ts

@@ -72,6 +72,7 @@ export class FarmIcon extends cc.Component {
             this.canUnlockNode.active = false;
             this.plantIcon.node.active = false;
             this.countDown.node.active = false;
+            this.process.node.active = false;
 
             switch (this.state) {
                 case FarmState.Lock:
@@ -90,6 +91,12 @@ export class FarmIcon extends cc.Component {
                 case FarmState.Ripe:
                     this.plantIcon.node.active = true;
                     this.countDown.node.active = true;
+                    this.countDown.setState(1);
+                    break;
+                case FarmState.Sick:
+                    this.plantIcon.node.active = true;
+                    this.countDown.node.active = true;
+                    this.countDown.setState(0);
                     break;
             }
         }
@@ -126,7 +133,8 @@ export class FarmIcon extends cc.Component {
                 gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this));
                 break;
             case FarmState.Sick:
-                mk.tip.pop(`生虫了!`);
+                // mk.tip.pop(`生虫了!`);
+                gData.adClearSickData.openPanel(this.configID);
                 break;
         }
     }

+ 2 - 57
assets/script/before/main/FarmSystem.ts

@@ -1,8 +1,6 @@
 
 import { FarmState } from '../../game/data/GameData';
-import Util from '../util/Util';
 import { FarmIcon } from './FarmIcon';
-import { TouchHelper } from './TouchHelper';
 const { ccclass } = cc._decorator;
 
 @ccclass
@@ -12,7 +10,7 @@ export class FarmSystem {
     public plantWindowIsOpening = false;
     /** 种植冷却 */
     public plantIsRequesting = false;
-    
+
     public set currSelectFarm(farm: FarmIcon) {
         if (this._currSelectFarm) {
             this._currSelectFarm.selectFarm(false);
@@ -26,55 +24,7 @@ export class FarmSystem {
     public get currSelectFarm(): FarmIcon {
         return this._currSelectFarm;
     }
-    private canvas: cc.Node;
-    start() {
-        this.canvas = cc.find("Canvas");
-        this.canvas.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
-        this.canvas.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);
-        this.canvas.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
-    }
-    private isMoved = false;
-    private onTouchEnd(e) {
-        if (!this.plantWindowIsOpening) {
-            let isInPoly = false;
-            for (let i = 0; i < this.farms.length; i++) {
-                const frame = this.farms[i];
-                const touchHelper = frame.getComponent(TouchHelper);
-                if (!this.isMoved && touchHelper.points.length >= 3) {
-                    this.isMoved = false;
-                    let touchPoint = e._point;
-                    let localPoint = frame.node.convertToNodeSpaceAR(touchPoint);
-                    isInPoly = Util.pointInPoly(localPoint, touchHelper.points);
-                    if (isInPoly) {//农场被点击
-                        frame.onTouch.call(frame);
-                        if (frame.state == FarmState.Empty) {
-                            this.currSelectFarm = frame;
-                        } else {
-                            this.closeWindow();
-                        }
-                        return;
-                    }
-                }
-            }
-            if (!isInPoly && this.currSelectFarm) {
-                this.closeWindow();
-            }
-            this.isMoved = false;
-        }
-    }
-    private onTouchMove(e: cc.Event.EventTouch) {
-        // this.closeWindow();
-        if (e.getTouches().length > 1) { this.isMoved = true; return }
-        this.isMoved = cc.Vec2.distance(e.getStartLocation(), e.getLocation()) > 20;
-    }
-    private closeWindow() {
-        //暂时注释
-        // WindowManager.close();
-        this.currSelectFarm = null;
-    }
-    private onTouchCancel(e) {
-        this.isMoved = false;
-    }
+
     public addFram(fram: FarmIcon) {
         this.farms[fram.sortID] = fram;
     }
@@ -108,11 +58,6 @@ export class FarmSystem {
             this.farms[index + 1].node.emit(cc.Node.EventType.TOUCH_END, e);
         }
     }
-    onDestroy() {
-        this.canvas.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
-        this.canvas.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);
-        this.canvas.off(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
-    }
 
     public novice_plant(): void {
         let frame = this.farms[0];

+ 140 - 0
assets/script/before/main/PastureIcon.ts

@@ -0,0 +1,140 @@
+/** 养殖类 */
+
+import { PastureState } from "../../game/data/GameData";
+import { FarmCountDown } from "./FarmCountDown";
+import { IDHelper } from "./IDHelper";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class PastureIcon extends cc.Component {
+
+    @property({ type: cc.Node, tooltip: "动物显示节点" }) animals: cc.Node = null;
+    @property({ type: cc.Node, tooltip: "动物喂食节点" }) eatNode: cc.Node = null;
+    @property({ type: FarmCountDown, tooltip: "倒计时组件" }) countDown: FarmCountDown = null;
+    @property({ type: Node, tooltip: "完成品展示节点" }) showGroup: Node;
+
+    public configID: number = 0;
+    public sortID: number = 0;
+
+    private _state: PastureState = -1;
+    public get state(): PastureState { return this._state; }
+
+    data = null;
+    //空地点击两次喂食
+    private emptyClick = false;
+
+    onLoad() {
+        this.configID = this.getComponent(IDHelper).buildID;
+        this.sortID = this.getComponent(IDHelper).sortID;
+    }
+
+    update() {
+        let index = gData.gameData.needFreshArr.indexOf(this.configID);
+        if (index != -1) {
+            this.freshState();
+            gData.gameData.needFreshArr.splice(index, 1);
+        }
+    }
+
+    start() {
+        this.freshState();
+    }
+
+    freshState() {
+        this.data = gData.gameData.getPastureDataMap(this.configID);
+        this.setState(this.data.state);
+    }
+
+    private setState(value: PastureState): void {
+        if (this.state != value) {
+            this._state = value;
+            this.animals.active = false;
+            this.eatNode.active = false;
+            this.countDown.node.active = false;
+
+            switch (this.state) {
+                case PastureState.Lock:
+                    break;
+                case PastureState.Empty:
+                    break;
+                case PastureState.Growing:
+                    this.countDown.node.active = true;
+                    break;
+                case PastureState.Ripe:
+                    this.countDown.node.active = true;
+                    this.countDown.setState(1);
+
+                    break;
+                case PastureState.Sick:
+                    this.countDown.node.active = true;
+                    this.countDown.setState(0);
+
+                    break;
+            }
+        }
+    }
+
+    /**生产完成 */
+    private 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 });
+        // }
+    }
+
+    private clean(): void {
+        // this.showGroup.removeAllChildren();
+        // this.havrestList = [];
+    }
+
+    public async onTouch() {
+        switch (this.data.state) {
+            case PastureState.Lock:
+                if (this.data.unlock == 2) {
+                    mk.tip.pop(`农场达到${this.data.value}级解锁`)
+                }
+                else if (this.data.unlock == 1) {
+                    mk.tip.pop(`喂食${this.data.name}${this.data.value}次解锁`)
+                }
+                break;
+            case PastureState.Empty:
+                if (!this.emptyClick) {
+                    this.eatNode.active = true;
+                }
+                else {
+                    this.animals.active = true;
+                    //调用喂食
+
+                    this.emptyClick = false;
+                }
+                break;
+            case PastureState.Growing:
+
+                break;
+            case PastureState.Ripe:
+                gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this));
+                break;
+            case PastureState.Sick:
+                // mk.tip.pop(`生虫了!`);
+                gData.adClearSickData.openPanel(this.configID);
+                break;
+        }
+    }
+
+    public onHarvest(): void {
+        this.countDown.cleanRiped();
+        this.clean();
+
+        this.data.state = PastureState.Empty;
+        this.data.productID = 0;
+        this.data.growSpan = 0;
+        gData.gameData.setPastureDataMap(this.configID, this.data);
+    }
+}

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

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "082d1e47-df1c-4b90-8039-bec8bef4214b",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 20 - 0
assets/script/before/view/data/ADClearSickData.ts

@@ -0,0 +1,20 @@
+/** 清除害虫数据类 */
+
+import { FarmState } from "../../../game/data/GameData";
+
+const { ccclass } = cc._decorator;
+
+@ccclass
+export default class ADClearSickData {
+    curConfigID = -1;
+    openPanel(id) {
+        this.curConfigID = id;
+        mk.ui.openPanel('game/prefab/uiPanel/ADClearSickPanel');
+    }
+
+    clearSick() {
+        let farm = gData.gameData.getFarmDataMap(this.curConfigID);
+        farm.state = FarmState.Ripe;
+        gData.gameData.needFreshArr.push(this.curConfigID);
+    }
+}

+ 9 - 0
assets/script/before/view/data/ADClearSickData.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "1a4bac61-1b13-46af-ac87-d1d990a3f116",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 21 - 0
assets/script/before/view/ui/ADClearSickPanel.ts

@@ -0,0 +1,21 @@
+/** 清除害虫 */
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class ADClearSickPanel extends cc.Component {
+    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)
+            }
+        });
+    }
+
+    onClickClose() {
+        //关闭banner广告等
+    }
+}

+ 9 - 0
assets/script/before/view/ui/ADClearSickPanel.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "71919bca-2441-4a16-860d-f7d7f8f5622c",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 0
assets/script/before/view/ui/ADUnlockPanel.ts

@@ -8,6 +8,7 @@ export default class ADUnlockPanel extends cc.Component {
             mk.console.log("watchAD:" + success);
             if (success) {
                 gData.adUnlockData.unlockFarm();
+                mk.ui.closePanel(this.node.name);
             }
         });
     }

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

@@ -29,6 +29,7 @@ import ADUnlockData from "../../before/view/data/ADUnlockData";
 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";
 
 /**
  * 数据集合全局类
@@ -82,6 +83,7 @@ class GData {
     public plantData: PlantData;
     public farmSystem: FarmSystem;
     public harvestData: HarvestData;
+    public adClearSickData: ADClearSickData;
 
     public moduleData: Map<number, Data>;
 
@@ -117,6 +119,7 @@ class GData {
         this.adUnlockData = new ADUnlockData();
         this.plantData = new PlantData();
         this.harvestData = new HarvestData();
+        this.adClearSickData = new ADClearSickData();
 
         this.farmSystem = new FarmSystem();
 

+ 65 - 1
assets/script/game/data/GameData.ts

@@ -129,6 +129,7 @@ export class GameData {
         gData.adData.watchNumToday = res_data.dayVideoTimesForRedMoney == null ? 0 : res_data.dayVideoTimesForRedMoney;
 
         this.setFramDataMapByServer();
+        this.setPastureDataMapByServer();
     }
 
     /**
@@ -327,7 +328,7 @@ export class GameData {
     public setFramDataMapByServer() {
         let len = this._farmData.length;
         //新玩家初始化农田数据
-        if (len <= 18) {
+        if (len < 18) {
             let id = 31000;
             let data = null;
             for (var i = 0; i < 18; i++) {
@@ -442,6 +443,58 @@ export class GameData {
         }
         return times;
     }
+
+    //------------- 养殖场数据-----------
+    /**  养殖场数据 服务器数据 */
+    private _pastureData = [];
+    /**  养殖场字典 本地数据,方便操作*/
+    private _pastureDataMap: Map<number, any> = new Map();
+
+    public setPastureDataMap(id, data, sendToServer = true) {
+        this._pastureDataMap.set(id, data);
+        let len = this._pastureData.length;
+        for (var i = 0; i < len; i++) {
+            if (this._pastureData[i].id == id) {
+                this._pastureData[i].state = data.state;
+                this._pastureData[i].productID = data.productID;
+                this._pastureData[i].growSpan = data.growSpan;
+                break;
+            }
+        }
+
+        this.needFreshArr.push(id);
+        //更新到服务器
+        if (sendToServer) {
+            this.setProp(GameProp.pastureData, this._pastureData);
+        }
+    }
+
+    public getPastureDataMap(id) {
+        return this._pastureDataMap.get(id);
+    }
+
+    /** 服务器数据设置到本地 */
+    public setPastureDataMapByServer() {
+        let len = this._pastureData.length;
+        //新玩家初始化农田数据
+        if (len < 3) {
+            let arr = this.getProductArrByType(ProductType.dw);
+            let len1 = arr.length;
+            let data = null;
+            for (var i = 0; i < len1; i++) {
+                data = { id: arr[i].picture, state: PastureState.Lock, productID: arr[i].picture, growSpan: 0 };
+                this._pastureData.push(data);
+                this._pastureDataMap.set(arr[i].picture, data);
+            }
+            //更新到服务器
+            this.setProp(GameProp.pastureData, this._pastureData);
+        }
+        else {
+            for (var i = 0; i < len; i++) {
+                this._pastureDataMap.set(this._pastureData[i].id, this._pastureData[i]);
+            }
+        }
+    }
 }
 
 /**
@@ -474,6 +527,9 @@ export enum GameProp {
     /** 最大可种植id */
     maxCanPlantID = 13,
 
+    /** 养殖场数据 */
+    pastureData = 14,
+
 
     /** ------------------ 转盘数据 ------------------------------ */
     turnable_leftTimes = 20,
@@ -789,6 +845,14 @@ export enum FarmState {
     Sick
 }
 
+export enum PastureState {
+    Lock,
+    Empty,
+    Growing,
+    Ripe,
+    Sick
+}
+
 export enum ProductType {
     nzw = '农作物',
     dw = '动物',

+ 3 - 3
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/1786486690/libcocos2dx.iml

@@ -33,16 +33,16 @@
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/src" isTestSource="false" />
     </content>
     <content url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx">
-      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
+      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/debug" type="java-resource" generated="true" />
-      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />

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

@@ -189,14 +189,14 @@
     <content url="file://$MODULE_DIR$/../../../app">
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <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/source/buildConfig/debug" 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" />
-      <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/source/apt/androidTest/debug" isTestSource="true" generated="true" />
       <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" />

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 499 - 65
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": 1629421751469,
-    "genTime": 1629421751469,
+    "buildTime": 1629541530104,
+    "genTime": 1629541530104,
     "genVersion": null
 }

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio