kaka %!s(int64=4) %!d(string=hai) anos
pai
achega
6b13c8bebb

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 362 - 125
assets/resources/game/coregame/coregame.prefab


BIN=BIN
assets/resources/game/coregame/texture/main/main/kuojian.png


+ 10 - 10
assets/resources/game/coregame/texture/main/main/kuojian.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 123,
-  "height": 117,
+  "width": 100,
+  "height": 79,
   "platformSettings": {},
   "subMetas": {
     "kuojian": {
@@ -18,14 +18,14 @@
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": -2,
-      "offsetY": 1,
-      "trimX": 2,
-      "trimY": 3,
-      "width": 115,
-      "height": 109,
-      "rawWidth": 123,
-      "rawHeight": 117,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 100,
+      "height": 79,
+      "rawWidth": 100,
+      "rawHeight": 79,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

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

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "2720deb7-f3d6-4c23-87e2-814817f2599b",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

BIN=BIN
assets/resources/game/coregame/texture/warning/warning.png


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

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "1c711f33-44b0-45bc-87b6-fd31c535e13a",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 74,
+  "height": 64,
+  "platformSettings": {},
+  "subMetas": {
+    "warning": {
+      "ver": "1.0.4",
+      "uuid": "b6f3f442-18dd-4c65-b86d-c273eeecb828",
+      "rawTextureUuid": "1c711f33-44b0-45bc-87b6-fd31c535e13a",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 74,
+      "height": 64,
+      "rawWidth": 74,
+      "rawHeight": 64,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN=BIN
assets/resources/game/coregame/texture/warning/warning_1.png


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

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "d375929b-48b6-4f7b-8ed3-c6ab996f8f92",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 58,
+  "height": 30,
+  "platformSettings": {},
+  "subMetas": {
+    "warning_1": {
+      "ver": "1.0.4",
+      "uuid": "82be5d5e-37d5-496c-a92a-2067f66cb75e",
+      "rawTextureUuid": "d375929b-48b6-4f7b-8ed3-c6ab996f8f92",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 58,
+      "height": 30,
+      "rawWidth": 58,
+      "rawHeight": 30,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN=BIN
assets/resources/game/coregame/texture/warning/warning_2.png


+ 36 - 0
assets/resources/game/coregame/texture/warning/warning_2.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "742f1693-c17a-420d-a13c-a39a2f8ea256",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 34,
+  "height": 34,
+  "platformSettings": {},
+  "subMetas": {
+    "warning_2": {
+      "ver": "1.0.4",
+      "uuid": "29e69f33-791c-43b4-9924-e416e2b89c8a",
+      "rawTextureUuid": "742f1693-c17a-420d-a13c-a39a2f8ea256",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 34,
+      "height": 34,
+      "rawWidth": 34,
+      "rawHeight": 34,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN=BIN
assets/resources/game/coregame/texture/warning/warning_3.png


+ 36 - 0
assets/resources/game/coregame/texture/warning/warning_3.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "68657271-e41a-492b-a5b3-c6d35a79c334",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 34,
+  "height": 34,
+  "platformSettings": {},
+  "subMetas": {
+    "warning_3": {
+      "ver": "1.0.4",
+      "uuid": "87c6572c-b068-4c78-a882-ab84c86a41be",
+      "rawTextureUuid": "68657271-e41a-492b-a5b3-c6d35a79c334",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 34,
+      "height": 34,
+      "rawWidth": 34,
+      "rawHeight": 34,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 12 - 2
assets/script/before/main/FarmCountDown.ts

@@ -6,11 +6,13 @@ const { ccclass, property } = cc._decorator;
 @ccclass
 export class FarmCountDown extends cc.Component {
     @property({ type: cc.Component.EventHandler, tooltip: "成熟回调" }) onRiped: cc.Component.EventHandler = null;
+    @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: BitmapFontC, tooltip: "常驻计时" }) normalCount: BitmapFontC = null;
     @property({ type: cc.Node, tooltip: "可收获图标" }) ripedIcon: cc.Node = null;
+    @property({ type: cc.Node, tooltip: "生病图标" }) sickIcon: cc.Node = null;
 
     private counting = false;
     /**成熟时间戳 */
@@ -25,6 +27,7 @@ export class FarmCountDown extends cc.Component {
             this.ripeTime = data.growSpan;
             this.totleTime = producting.time;
             this.normalGroup.active = true;
+            this.sickIcon.active = false;
             this.counting = true;
             this.normalCount.string = '';
             this.normalProgress.progress = 0;
@@ -45,6 +48,7 @@ export class FarmCountDown extends cc.Component {
     public cleanRiped(): void {
         this.isDataed = false;
         this.ripedIcon.active = false;
+        this.sickIcon.active = false;
     }
 
     public async onSpeed() {
@@ -66,8 +70,14 @@ export class FarmCountDown extends cc.Component {
     private riped(): void {
         this.counting = false;
         this.normalGroup.active = false;
-        this.ripedIcon.active = true;
-        this.onRiped && this.onRiped.emit(null);
+        if (Math.random() < 0.4) {
+            this.sickIcon.active = true;
+            this.onSick && this.onSick.emit(null);
+        }
+        else {
+            this.ripedIcon.active = true;
+            this.onRiped && this.onRiped.emit(null);
+        }
     }
 }
 

+ 12 - 0
assets/script/before/main/FarmIcon.ts

@@ -125,6 +125,9 @@ export class FarmIcon extends cc.Component {
                 gData.farmSystem.currSelectFarm = this;
                 gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this));
                 break;
+            case FarmState.Sick:
+                mk.tip.pop(`生虫了!`);
+                break;
         }
     }
 
@@ -160,6 +163,8 @@ export class FarmIcon extends cc.Component {
             gData.farmSystem.plantIsRequesting = false;
         }
     }
+
+    /** 成熟 */
     public onRiped(): void {
         this._state = FarmState.Ripe;
         this.data.state = FarmState.Ripe;
@@ -167,6 +172,13 @@ export class FarmIcon extends cc.Component {
         gData.gameData.addProductMakeTimesById(this.plantID);
     }
 
+    /** 生虫 */
+    public onSick() {
+        this._state = FarmState.Sick;
+        this.data.state = FarmState.Sick;
+        gData.gameData.setFarmDataMap(this.configID, this.data);
+    }
+
     private async onPlantAnimationFinish() {
         this.plantIcon.getComponent(cc.Animation).off(cc.Animation.EventType.FINISHED, this.onPlantAnimationFinish, this);
         this.plantIcon.node.active = false;

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

@@ -785,7 +785,8 @@ export enum FarmState {
     CanUnlock,
     Empty,
     Growing,
-    Ripe
+    Ripe,
+    Sick
 }
 
 export enum ProductType {

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio