wuwangdong 4 년 전
부모
커밋
cea79611b5

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 267 - 129
assets/resources/game/coregame/coregame.prefab


+ 154 - 19
assets/resources/game/prefab/game.prefab

@@ -27,14 +27,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 246
+        "__id__": 250
       },
       {
-        "__id__": 248
+        "__id__": 252
       }
     ],
     "_prefab": {
-      "__id__": 249
+      "__id__": 253
     },
     "_opacity": 255,
     "_color": {
@@ -4484,7 +4484,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "97f6TOTmlBHLiKYpiMbLk4",
+    "fileId": "80rwgqCN9EkYIgK2NpE6rR",
     "sync": false
   },
   {
@@ -4696,7 +4696,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "32/1s0FotIfIw/n7hPVAcm",
+    "fileId": "23dYlPEvRAtIcOBV0zvjpe",
     "sync": false
   },
   {
@@ -4805,7 +4805,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "576m+NoXhJDbgeqZ38iR2/",
+    "fileId": "b1jk6LGrVBC6D9uI51U6CX",
     "sync": false
   },
   {
@@ -5964,11 +5964,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 244
+        "__id__": 248
       }
     ],
     "_prefab": {
-      "__id__": 245
+      "__id__": 249
     },
     "_opacity": 255,
     "_color": {
@@ -6039,16 +6039,19 @@
       },
       {
         "__id__": 236
+      },
+      {
+        "__id__": 240
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 242
+        "__id__": 246
       }
     ],
     "_prefab": {
-      "__id__": 243
+      "__id__": 247
     },
     "_opacity": 255,
     "_color": {
@@ -8018,7 +8021,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "气泡红包按钮",
+    "_name": "增加效果文本2",
     "_objFlags": 0,
     "_parent": {
       "__id__": 180
@@ -8031,13 +8034,142 @@
       },
       {
         "__id__": 238
+      }
+    ],
+    "_prefab": {
+      "__id__": 239
+    },
+    "_opacity": 0,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 209.61,
+      "height": 67
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        86.86,
+        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__": 236
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "生产次数+1",
+    "_N$string": "生产次数+1",
+    "_fontSize": 40,
+    "_lineHeight": 50,
+    "_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__": 236
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 139,
+      "g": 69,
+      "b": 19,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
+    },
+    "fileId": "161QjvTAxJWq61M3eiy0J9",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "气泡红包按钮",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 180
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 241
       },
       {
-        "__id__": 239
+        "__id__": 242
+      },
+      {
+        "__id__": 243
       }
     ],
     "_prefab": {
-      "__id__": 241
+      "__id__": 245
     },
     "_opacity": 255,
     "_color": {
@@ -8091,7 +8223,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 236
+      "__id__": 240
     },
     "_enabled": true,
     "_materials": [
@@ -8123,7 +8255,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 236
+      "__id__": 240
     },
     "_enabled": true,
     "_defaultClip": {
@@ -8142,7 +8274,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 236
+      "__id__": 240
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -8151,7 +8283,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 240
+        "__id__": 244
       }
     ],
     "_N$interactable": true,
@@ -8300,7 +8432,7 @@
       "__id__": 186
     },
     "btn8": {
-      "__id__": 236
+      "__id__": 240
     },
     "_id": ""
   },
@@ -8345,7 +8477,7 @@
       "__id__": 3
     },
     "nodeRedPoint": {
-      "__id__": 247
+      "__id__": 251
     },
     "icon_plant": {
       "__id__": 193
@@ -8383,6 +8515,9 @@
     "ani_add2": {
       "__id__": 232
     },
+    "ani_add3": {
+      "__id__": 236
+    },
     "_id": ""
   },
   {

+ 138 - 3
assets/resources/game/prefab/uiItem/PlantItem.prefab

@@ -22,19 +22,22 @@
       },
       {
         "__id__": 57
+      },
+      {
+        "__id__": 70
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 70
+        "__id__": 74
       },
       {
-        "__id__": 71
+        "__id__": 75
       }
     ],
     "_prefab": {
-      "__id__": 72
+      "__id__": 76
     },
     "_opacity": 255,
     "_color": {
@@ -2593,6 +2596,135 @@
     "sync": false
   },
   {
+    "__type__": "cc.Node",
+    "_name": "增加效果文本",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 71
+      },
+      {
+        "__id__": 72
+      }
+    ],
+    "_prefab": {
+      "__id__": 73
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 168.05,
+      "height": 67
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        90,
+        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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 70
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "百元红包:10/10",
+    "_N$string": "百元红包:10/10",
+    "_fontSize": 24,
+    "_lineHeight": 50,
+    "_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": 2,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 70
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 139,
+      "g": 69,
+      "b": 19,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "ca279bfd-c7e6-46f5-9731-0a636e046674"
+    },
+    "fileId": "6dOU1jxaNI54C+BYN3jAss",
+    "sync": false
+  },
+  {
     "__type__": "cc.Sprite",
     "_name": "",
     "_objFlags": 0,
@@ -2662,6 +2794,9 @@
     "node_product": {
       "__id__": 48
     },
+    "node_ani": {
+      "__id__": 70
+    },
     "_id": ""
   },
   {

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

@@ -19,6 +19,8 @@ export default class PastureIcon extends cc.Component {
 
     @property({ type: cc.Node, tooltip: '闲置动画' }) idleAni: cc.Node = null;
 
+    @property({ type: cc.Node, tooltip: '文字动画' }) node_ani: cc.Node = null;
+
     private animalsArr: Array<Animals> = new Array<Animals>();
 
     public configID: number = 0;
@@ -204,6 +206,20 @@ export default class PastureIcon extends cc.Component {
             let flyRed = await gData.gameData.updateNewTaskProgress();
             if (flyRed) {
                 //mk.audio.playEffect('redmoney');
+                if (gData.gameData.playerProp.userFarmTaskInfo) {
+                    let com = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
+                    let count = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
+    
+                    let addAni = cc.instantiate(this.node_ani);
+                    addAni.parent = this.node_ani.parent;
+                    addAni.getComponent(cc.Label).string = `百元红包:${com}/${count}`;      
+                    cc.tween(addAni).call(()=>{
+                        addAni.opacity = 255;
+                    }).by(0.8, {y : 100}).to(0.4, {opacity : 0}).call(()=>{
+                        addAni.destroy();
+                    }).start();
+                }
+
                 let pos = this.eatNode.parent.convertToWorldSpaceAR(this.eatNode.getPosition());
                 gData.gameData.gameStyle.dpFlyRedAni(pos);
             }

+ 16 - 0
assets/script/before/view/uiItem/PlantItem.ts

@@ -19,6 +19,7 @@ export default class PlantItem extends cc.Component {
     @property({ type: cc.Node }) node_plant: cc.Node = null;
     @property({ type: cc.Node }) node_product: cc.Node = null;
 
+    @property({ type: cc.Node, tooltip: '文字动画' }) node_ani: cc.Node = null;
 
     private data = null;
     /**
@@ -124,6 +125,21 @@ export default class PlantItem extends cc.Component {
         let flyRed = await gData.gameData.updateNewTaskProgress(true);
 
         if (flyRed) {
+
+            if (gData.gameData.playerProp.userFarmTaskInfo) {
+                let com = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
+                let count = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
+
+                let addAni = cc.instantiate(this.node_ani);
+                addAni.parent = this.node_ani.parent;
+                addAni.getComponent(cc.Label).string = `百元红包:${com}/${count}`;      
+                cc.tween(addAni).call(()=>{
+                    addAni.opacity = 255;
+                }).by(0.8, {y : 100}).to(0.4, {opacity : 0}).call(()=>{
+                    addAni.destroy();
+                }).start();
+            }
+            
             let pos = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
             gData.gameData.gameStyle.dpFlyRedAni(pos);
         }

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

@@ -64,6 +64,8 @@ export default class Game extends cc.Component {
 
     @property({ type: cc.Node, displayName: '增加效果文本2' })
     ani_add2: cc.Node = null;
+    @property({ type: cc.Node, displayName: '增加效果文本3' })
+    ani_add3: cc.Node = null;
 
     posY = 0;
     /** 是否开始增加次数倒计时 */
@@ -433,6 +435,22 @@ export default class Game extends cc.Component {
 
         if (flyRed) {
             //mk.audio.playEffect('redmoney');
+
+            if (gData.gameData.playerProp.userFarmTaskInfo) {
+                let com = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
+                let count = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
+
+                let addAni = cc.instantiate(this.ani_add3);
+                addAni.parent = this.ani_add3.parent;
+                addAni.getComponent(cc.Label).string = `百元红包:${com}/${count}`;      
+                cc.tween(addAni).call(()=>{
+                    addAni.opacity = 255;
+                }).by(0.8, {y : 100}).to(0.4, {opacity : 0}).call(()=>{
+                    addAni.destroy();
+                }).start();
+            }
+            
+
             this.dpFlyRedAni();
         }
     }

+ 3 - 0
assets/script/game/module/speedUpUI/ProductReward.ts

@@ -78,6 +78,9 @@ export default class ProductReward extends cc.Component {
                     }
                     this.lbl_progress.string = `${com}/${count}`;
                     this.sp_taskProgress.fillRange = com / count;
+                }else{
+                    this.node_1.active = false;
+                    this.node_2.active = true;
                 }
             }
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.