Quellcode durchsuchen

缩放动画提交,spine文件夹改名

薛鸿潇 vor 5 Jahren
Ursprung
Commit
53eb9d6f62

+ 12 - 0
mk_framework/assets/resources/animation.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "b4174694-7486-40ac-8338-42f83f3db71f",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 57 - 0
mk_framework/assets/resources/animation/ScaleLoop0.9To1.1.anim

@@ -0,0 +1,57 @@
+{
+  "__type__": "cc.AnimationClip",
+  "_name": "ScaleLoop0.9To1.1",
+  "_objFlags": 0,
+  "_native": "",
+  "_duration": 0.6666666666666666,
+  "sample": 60,
+  "speed": 0.5,
+  "wrapMode": 2,
+  "curveData": {
+    "props": {
+      "scale": [
+        {
+          "frame": 0,
+          "value": {
+            "__type__": "cc.Vec2",
+            "x": 1,
+            "y": 1
+          }
+        },
+        {
+          "frame": 0.16666666666666666,
+          "value": {
+            "__type__": "cc.Vec2",
+            "x": 1.1,
+            "y": 1.1
+          }
+        },
+        {
+          "frame": 0.3333333333333333,
+          "value": {
+            "__type__": "cc.Vec2",
+            "x": 1,
+            "y": 1
+          }
+        },
+        {
+          "frame": 0.5,
+          "value": {
+            "__type__": "cc.Vec2",
+            "x": 0.9,
+            "y": 0.9
+          }
+        },
+        {
+          "frame": 0.6666666666666666,
+          "value": {
+            "__type__": "cc.Vec2",
+            "x": 1,
+            "y": 1
+          }
+        }
+      ]
+    }
+  },
+  "events": []
+}

+ 5 - 0
mk_framework/assets/resources/animation/ScaleLoop0.9To1.1.anim.meta

@@ -0,0 +1,5 @@
+{
+  "ver": "2.1.0",
+  "uuid": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7",
+  "subMetas": {}
+}

+ 105 - 80
mk_framework/assets/resources/module/pigBank/pigBank.prefab

@@ -21,15 +21,12 @@
         "__id__": 2
       },
       {
-        "__id__": 56
+        "__id__": 57
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 61
-      },
-      {
         "__id__": 62
       },
       {
@@ -37,10 +34,13 @@
       },
       {
         "__id__": 64
+      },
+      {
+        "__id__": 65
       }
     ],
     "_prefab": {
-      "__id__": 65
+      "__id__": 66
     },
     "_opacity": 255,
     "_color": {
@@ -104,29 +104,29 @@
         "__id__": 6
       },
       {
-        "__id__": 15
+        "__id__": 16
       },
       {
-        "__id__": 23
+        "__id__": 24
       },
       {
-        "__id__": 32
+        "__id__": 33
       },
       {
-        "__id__": 35
+        "__id__": 36
       },
       {
-        "__id__": 39
+        "__id__": 40
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 54
+        "__id__": 55
       }
     ],
     "_prefab": {
-      "__id__": 55
+      "__id__": 56
     },
     "_opacity": 255,
     "_color": {
@@ -311,10 +311,13 @@
       },
       {
         "__id__": 12
+      },
+      {
+        "__id__": 14
       }
     ],
     "_prefab": {
-      "__id__": 14
+      "__id__": 15
     },
     "_opacity": 255,
     "_color": {
@@ -545,8 +548,8 @@
     ],
     "_N$interactable": true,
     "_N$enableAutoGrayEffect": false,
-    "_N$transition": 3,
-    "transition": 3,
+    "_N$transition": 0,
+    "transition": 0,
     "_N$normalColor": {
       "__type__": "cc.Color",
       "r": 255,
@@ -609,6 +612,25 @@
     "customEventData": ""
   },
   {
+    "__type__": "cc.Animation",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_defaultClip": {
+      "__uuid__": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7"
+    },
+    "_clips": [
+      {
+        "__uuid__": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7"
+      }
+    ],
+    "playOnLoad": false,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -628,20 +650,20 @@
     },
     "_children": [
       {
-        "__id__": 16
+        "__id__": 17
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 19
+        "__id__": 20
       },
       {
-        "__id__": 21
+        "__id__": 22
       }
     ],
     "_prefab": {
-      "__id__": 22
+      "__id__": 23
     },
     "_opacity": 255,
     "_color": {
@@ -695,17 +717,17 @@
     "_name": "问号纹理",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 15
+      "__id__": 16
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 17
+        "__id__": 18
       }
     ],
     "_prefab": {
-      "__id__": 18
+      "__id__": 19
     },
     "_opacity": 255,
     "_color": {
@@ -759,7 +781,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 16
+      "__id__": 17
     },
     "_enabled": true,
     "_materials": [
@@ -802,7 +824,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 15
+      "__id__": 16
     },
     "_enabled": true,
     "panel_name": "help",
@@ -810,7 +832,7 @@
     "panel_type": 2,
     "onComplete": [
       {
-        "__id__": 20
+        "__id__": 21
       }
     ],
     "_id": ""
@@ -830,7 +852,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 15
+      "__id__": 16
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -913,20 +935,20 @@
     },
     "_children": [
       {
-        "__id__": 24
+        "__id__": 25
       },
       {
-        "__id__": 27
+        "__id__": 28
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 30
+        "__id__": 31
       }
     ],
     "_prefab": {
-      "__id__": 31
+      "__id__": 32
     },
     "_opacity": 255,
     "_color": {
@@ -980,17 +1002,17 @@
     "_name": "绿色纸币",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 23
+      "__id__": 24
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 25
+        "__id__": 26
       }
     ],
     "_prefab": {
-      "__id__": 26
+      "__id__": 27
     },
     "_opacity": 255,
     "_color": {
@@ -1044,7 +1066,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 24
+      "__id__": 25
     },
     "_enabled": true,
     "_materials": [
@@ -1087,17 +1109,17 @@
     "_name": "存款数量",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 23
+      "__id__": 24
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 28
+        "__id__": 29
       }
     ],
     "_prefab": {
-      "__id__": 29
+      "__id__": 30
     },
     "_opacity": 255,
     "_color": {
@@ -1151,7 +1173,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 28
     },
     "_enabled": true,
     "_materials": [
@@ -1197,7 +1219,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 23
+      "__id__": 24
     },
     "_enabled": true,
     "_materials": [
@@ -1246,11 +1268,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 34
       }
     ],
     "_prefab": {
-      "__id__": 34
+      "__id__": 35
     },
     "_opacity": 255,
     "_color": {
@@ -1304,7 +1326,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 32
+      "__id__": 33
     },
     "_enabled": true,
     "_materials": [
@@ -1353,14 +1375,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 36
+        "__id__": 37
       },
       {
-        "__id__": 37
+        "__id__": 38
       }
     ],
     "_prefab": {
-      "__id__": 38
+      "__id__": 39
     },
     "_opacity": 255,
     "_color": {
@@ -1414,7 +1436,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 35
+      "__id__": 36
     },
     "_enabled": true,
     "_materials": [
@@ -1446,7 +1468,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 35
+      "__id__": 36
     },
     "_enabled": true,
     "angle": 15,
@@ -1473,23 +1495,23 @@
     },
     "_children": [
       {
-        "__id__": 40
+        "__id__": 41
       },
       {
-        "__id__": 44
+        "__id__": 45
       },
       {
-        "__id__": 48
+        "__id__": 49
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 52
+        "__id__": 53
       }
     ],
     "_prefab": {
-      "__id__": 53
+      "__id__": 54
     },
     "_opacity": 255,
     "_color": {
@@ -1543,20 +1565,20 @@
     "_name": "描述1",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 39
+      "__id__": 40
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 41
+        "__id__": 42
       },
       {
-        "__id__": 42
+        "__id__": 43
       }
     ],
     "_prefab": {
-      "__id__": 43
+      "__id__": 44
     },
     "_opacity": 255,
     "_color": {
@@ -1610,7 +1632,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 40
+      "__id__": 41
     },
     "_enabled": true,
     "_materials": [
@@ -1645,7 +1667,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 40
+      "__id__": 41
     },
     "_enabled": true,
     "_color": {
@@ -1674,20 +1696,20 @@
     "_name": "描述2",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 39
+      "__id__": 40
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 45
+        "__id__": 46
       },
       {
-        "__id__": 46
+        "__id__": 47
       }
     ],
     "_prefab": {
-      "__id__": 47
+      "__id__": 48
     },
     "_opacity": 255,
     "_color": {
@@ -1741,7 +1763,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 44
+      "__id__": 45
     },
     "_enabled": true,
     "_materials": [
@@ -1776,7 +1798,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 44
+      "__id__": 45
     },
     "_enabled": true,
     "_color": {
@@ -1805,20 +1827,20 @@
     "_name": "描述3",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 39
+      "__id__": 40
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 49
+        "__id__": 50
       },
       {
-        "__id__": 50
+        "__id__": 51
       }
     ],
     "_prefab": {
-      "__id__": 51
+      "__id__": 52
     },
     "_opacity": 255,
     "_color": {
@@ -1872,7 +1894,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 48
+      "__id__": 49
     },
     "_enabled": true,
     "_materials": [
@@ -1907,7 +1929,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 48
+      "__id__": 49
     },
     "_enabled": true,
     "_color": {
@@ -1936,7 +1958,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 39
+      "__id__": 40
     },
     "_enabled": true,
     "_layoutSize": {
@@ -2023,17 +2045,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 57
-      },
-      {
         "__id__": 58
       },
       {
         "__id__": 59
+      },
+      {
+        "__id__": 60
       }
     ],
     "_prefab": {
-      "__id__": 60
+      "__id__": 61
     },
     "_opacity": 255,
     "_color": {
@@ -2087,7 +2109,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 56
+      "__id__": 57
     },
     "_enabled": true,
     "_materials": [
@@ -2119,7 +2141,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 56
+      "__id__": 57
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -2187,7 +2209,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 56
+      "__id__": 57
     },
     "_enabled": true,
     "node_panel": {
@@ -2246,10 +2268,13 @@
       "__id__": 8
     },
     "lbl_deposit": {
-      "__id__": 28
+      "__id__": 29
     },
     "node_tip_anim": {
-      "__id__": 35
+      "__id__": 36
+    },
+    "anim_btn_cash": {
+      "__id__": 14
     },
     "_id": ""
   },

+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab.meta → mk_framework/assets/resources/module/pigBank/spine.meta


+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab/pig.atlas → mk_framework/assets/resources/module/pigBank/spine/pig.atlas


+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab/pig.atlas.meta → mk_framework/assets/resources/module/pigBank/spine/pig.atlas.meta


+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab/pig.json → mk_framework/assets/resources/module/pigBank/spine/pig.json


+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab/pig.json.meta → mk_framework/assets/resources/module/pigBank/spine/pig.json.meta


+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab/pig.png → mk_framework/assets/resources/module/pigBank/spine/pig.png


+ 0 - 0
mk_framework/assets/resources/module/pigBank/spine_prefab/pig.png.meta → mk_framework/assets/resources/module/pigBank/spine/pig.png.meta


+ 1 - 1
mk_framework/assets/script/game/data/module/PigBankData.ts

@@ -10,7 +10,7 @@
  */
 export class PigBankData {
     /** 是否可提现 */
-    public cash_enable: boolean = false;
+    public cash_enable: boolean = true;
     /** 当前存款 */
     public cur_cash_count: number = 0.36;
 

+ 6 - 1
mk_framework/assets/script/game/module/module/pigBank/PigBank.ts

@@ -13,6 +13,8 @@ export default class PigBank extends cc.Component {
     private lbl_deposit: cc.Label = null!;
     @property({ type: cc.Node, displayName: '提示动画' })
     private node_tip_anim: cc.Node = null!;
+    @property({ type: cc.Animation, displayName: '提现动画' })
+    private anim_btn_cash: cc.Animation = null!;
 
     onLoad() {
 
@@ -32,13 +34,16 @@ export default class PigBank extends cc.Component {
         if (g.pigbank.cash_enable) {
             this.lbl_get_desc.string = '直接提现';
             this.node_tip_anim.active = false;
+            this.anim_btn_cash.play();
         } else {
-            this.node_tip_anim.active = true;
             if (g.pigbank.cur_cash_count >= g.pigbank.cash_min_limit) {
                 this.lbl_get_desc.string = '明日可提现';
             } else {
                 this.lbl_get_desc.string = '满' + g.pigbank.cash_min_limit + '元可提';
             }
+            this.node_tip_anim.active = true;
+            this.anim_btn_cash.stop();
+            this.anim_btn_cash.node.scale = 1;
         }
         this.initDeposit()
     }