薛鸿潇 %!s(int64=5) %!d(string=hai) anos
pai
achega
bb7f011889

+ 0 - 0
assets/resources/animation/ScaleLoop0.9To1.1.anim → assets/resources/animation/ScaleLoop0.95To1.05.anim


+ 0 - 0
assets/resources/animation/ScaleLoop0.9To1.1.anim.meta → assets/resources/animation/ScaleLoop0.95To1.05.anim.meta


+ 26 - 4
assets/resources/game/prefab/game.prefab

@@ -45,14 +45,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 164
+        "__id__": 165
       },
       {
-        "__id__": 165
+        "__id__": 166
       }
     ],
     "_prefab": {
-      "__id__": 166
+      "__id__": 167
     },
     "_opacity": 255,
     "_color": {
@@ -5181,10 +5181,13 @@
       },
       {
         "__id__": 162
+      },
+      {
+        "__id__": 163
       }
     ],
     "_prefab": {
-      "__id__": 163
+      "__id__": 164
     },
     "_opacity": 255,
     "_color": {
@@ -5467,6 +5470,25 @@
     "_id": ""
   },
   {
+    "__type__": "cc.Animation",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 156
+    },
+    "_enabled": true,
+    "_defaultClip": {
+      "__uuid__": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7"
+    },
+    "_clips": [
+      {
+        "__uuid__": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7"
+      }
+    ],
+    "playOnLoad": true,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 13 - 10
assets/resources/module/redBagCash/redBagCash.prefab

@@ -661,7 +661,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 113.5,
+      "width": 31.38,
       "height": 63.22
     },
     "_anchorPoint": {
@@ -713,8 +713,8 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "3000",
-    "_N$string": "3000",
+    "_string": "0",
+    "_N$string": "0",
     "_fontSize": 48,
     "_lineHeight": 47.3,
     "_enableWrapText": true,
@@ -949,7 +949,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 115.81,
+      "width": 87.39,
       "height": 50
     },
     "_anchorPoint": {
@@ -1025,7 +1025,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -40.905,
+        -26.695,
         0,
         0,
         0,
@@ -1123,7 +1123,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 47.81,
+      "width": 19.39,
       "height": 42.84
     },
     "_anchorPoint": {
@@ -1175,8 +1175,8 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "0.3",
-    "_N$string": "0.3",
+    "_string": "0",
+    "_N$string": "0",
     "_fontSize": 34,
     "_lineHeight": 34,
     "_enableWrapText": true,
@@ -1245,7 +1245,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        40.905,
+        26.695,
         0,
         0,
         0,
@@ -1326,7 +1326,7 @@
     "_enabled": true,
     "_layoutSize": {
       "__type__": "cc.Size",
-      "width": 115.81,
+      "width": 87.39,
       "height": 50
     },
     "_resize": 1,
@@ -2198,6 +2198,9 @@
     "sroll_view": {
       "__id__": 50
     },
+    "node_content": {
+      "__id__": 46
+    },
     "lbl_redbag": {
       "__id__": 15
     },

+ 18 - 0
assets/script/game/module/redBagCash/RedBagCash.ts

@@ -10,6 +10,8 @@ export default class RedBagCash extends cc.Component {
 
     @property({ displayName: '滚动视图', type: cc.ScrollView })
     private sroll_view: cc.ScrollView = null!;
+    @property({ displayName: '条目容器', type: cc.Node })
+    private node_content: cc.Node = null!;
     @property({ displayName: 'lbl红包数量', type: cc.Label })
     private lbl_redbag: cc.Label = null!;
     @property({ displayName: 'lbl毛币数量', type: cc.Label })
@@ -39,6 +41,22 @@ export default class RedBagCash extends cc.Component {
     private initScrollView() {
         this.sroll_view.node.emit('srollview-init', gData.redBagCash.c_data);
         gData.redBagCash.init_list = false;
+        // 条目动画
+        this.itemAnim();
+    }
+
+    private itemAnim() {
+        let arr_node = this.node_content.children;
+        const n_count = this.node_content.childrenCount;
+        const start_pos = new cc.Vec2(0, -this.sroll_view.node.height);
+        for (let i = 0; i < n_count; i++) {
+            let node_item = arr_node[i];
+            const end_pos = node_item.getPosition();
+            node_item.y = start_pos.y;
+            this.scheduleOnce(() => {
+                mk.tween.move(node_item, 0.6, start_pos, end_pos, null, 'backOut');
+            }, i * 0.1)
+        }
     }
 
     /**