wuwangdong 4 lat temu
rodzic
commit
e3ead93aad

Plik diff jest za duży
+ 245 - 281
assets/resources/module/login/login.prefab


BIN
assets/resources/module/login/texture/old/launchLogo.png


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

@@ -18,14 +18,14 @@
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": 3.5,
-      "offsetY": 34.5,
-      "trimX": 32,
-      "trimY": 60,
-      "width": 455,
-      "height": 323,
-      "rawWidth": 512,
-      "rawHeight": 512,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 365,
+      "height": 256,
+      "rawWidth": 365,
+      "rawHeight": 256,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

+ 165 - 86
assets/resources/module/sign/sign.prefab

@@ -24,20 +24,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 51
+        "__id__": 60
       },
       {
-        "__id__": 52
+        "__id__": 61
       },
       {
-        "__id__": 53
+        "__id__": 62
       },
       {
-        "__id__": 55
+        "__id__": 64
       }
     ],
     "_prefab": {
-      "__id__": 56
+      "__id__": 65
     },
     "_opacity": 255,
     "_color": {
@@ -101,11 +101,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 49
+        "__id__": 58
       }
     ],
     "_prefab": {
-      "__id__": 50
+      "__id__": 59
     },
     "_opacity": 255,
     "_color": {
@@ -181,13 +181,13 @@
         "__id__": 28
       },
       {
-        "__id__": 42
+        "__id__": 47
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 48
+      "__id__": 57
     },
     "_opacity": 255,
     "_color": {
@@ -629,6 +629,7 @@
     "itemInterval": 0,
     "node_xiabiao": null,
     "direction": 1,
+    "isHideAllChild": true,
     "_id": ""
   },
   {
@@ -1112,10 +1113,13 @@
       },
       {
         "__id__": 40
+      },
+      {
+        "__id__": 41
       }
     ],
     "_prefab": {
-      "__id__": 41
+      "__id__": 46
     },
     "_opacity": 255,
     "_color": {
@@ -1559,6 +1563,76 @@
     "_id": ""
   },
   {
+    "__type__": "a20d9E+N7FBiIV7z1whuT6J",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 28
+    },
+    "_enabled": true,
+    "fromData": {
+      "__id__": 42
+    },
+    "targetData": [
+      {
+        "__id__": 43
+      }
+    ],
+    "target": {
+      "__id__": 28
+    },
+    "tweenEasing": 21,
+    "repeat": 1,
+    "onOneRepeatComplete": {
+      "__id__": 45
+    },
+    "playOnLoad": true,
+    "isSetSuitStartPos": false,
+    "_id": ""
+  },
+  {
+    "__type__": "PropsData",
+    "position": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": -1030
+    },
+    "angle": 0,
+    "scale": 0,
+    "active": false
+  },
+  {
+    "__type__": "TweenData",
+    "propsData": {
+      "__id__": 44
+    },
+    "duration": 0.2,
+    "delay": 0.6,
+    "isOffset": false,
+    "onComplete": [],
+    "onStart": [],
+    "onUpdate": []
+  },
+  {
+    "__type__": "PropsData",
+    "position": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": -408.938
+    },
+    "angle": 0,
+    "scale": 1,
+    "active": true
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": null,
+    "component": "",
+    "_componentId": "",
+    "handler": "",
+    "customEventData": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -1580,17 +1654,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 43
+        "__id__": 48
       },
       {
-        "__id__": 44
+        "__id__": 49
       },
       {
-        "__id__": 45
+        "__id__": 51
       }
     ],
     "_prefab": {
-      "__id__": 47
+      "__id__": 56
     },
     "_opacity": 255,
     "_color": {
@@ -1644,7 +1718,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 42
+      "__id__": 47
     },
     "_enabled": true,
     "_materials": [
@@ -1672,79 +1746,11 @@
     "_id": ""
   },
   {
-    "__type__": "cc.Button",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 42
-    },
-    "_enabled": true,
-    "_normalMaterial": null,
-    "_grayMaterial": null,
-    "duration": 0.1,
-    "zoomScale": 1.2,
-    "clickEvents": [],
-    "_N$interactable": true,
-    "_N$enableAutoGrayEffect": false,
-    "_N$transition": 3,
-    "transition": 3,
-    "_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__": "cdc50kCRVVBa5gcp4XXxVO+",
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 42
+      "__id__": 47
     },
     "_enabled": true,
     "node_panel": {
@@ -1753,7 +1759,7 @@
     "transition_type": 0,
     "onComplete": [
       {
-        "__id__": 46
+        "__id__": 50
       }
     ],
     "_id": ""
@@ -1769,6 +1775,76 @@
     "customEventData": ""
   },
   {
+    "__type__": "a20d9E+N7FBiIV7z1whuT6J",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 47
+    },
+    "_enabled": true,
+    "fromData": {
+      "__id__": 52
+    },
+    "targetData": [
+      {
+        "__id__": 53
+      }
+    ],
+    "target": {
+      "__id__": 47
+    },
+    "tweenEasing": 21,
+    "repeat": 1,
+    "onOneRepeatComplete": {
+      "__id__": 55
+    },
+    "playOnLoad": true,
+    "isSetSuitStartPos": false,
+    "_id": ""
+  },
+  {
+    "__type__": "PropsData",
+    "position": {
+      "__type__": "cc.Vec2",
+      "x": 258.178,
+      "y": 482.904
+    },
+    "angle": 0,
+    "scale": 0,
+    "active": false
+  },
+  {
+    "__type__": "TweenData",
+    "propsData": {
+      "__id__": 54
+    },
+    "duration": 0.3,
+    "delay": 0.8,
+    "isOffset": false,
+    "onComplete": [],
+    "onStart": [],
+    "onUpdate": []
+  },
+  {
+    "__type__": "PropsData",
+    "position": {
+      "__type__": "cc.Vec2",
+      "x": 258.178,
+      "y": 482.904
+    },
+    "angle": 0,
+    "scale": 1,
+    "active": true
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": null,
+    "component": "",
+    "_componentId": "",
+    "handler": "",
+    "customEventData": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -1892,7 +1968,7 @@
     "bClickClose": true,
     "onComplete": [
       {
-        "__id__": 54
+        "__id__": 63
       }
     ],
     "_id": ""
@@ -1919,8 +1995,11 @@
       "__id__": 2
     },
     "open_effect": 1,
+    "isOpenCloseEffect": true,
     "close_effect": 1,
     "close_toPoint": "",
+    "close_uibg": false,
+    "isDelayOneFrame": false,
     "_id": ""
   },
   {

+ 19 - 7
assets/script/game/component/TableView.ts

@@ -33,6 +33,9 @@ export default class TableView extends cc.Component {
     @property({ displayName: '滚动方向', tooltip: '', type: cc.Enum(Direction) })
     private direction = Direction.vertical;
 
+    @property({displayName: "初始化时所有子节点隐藏"})
+    private isHideAllChild: boolean = false;
+
     /** 数据 */
     private itemData: any = null;
     /** 滚动列表组件 */
@@ -86,7 +89,7 @@ export default class TableView extends cc.Component {
         this.layerHeight = this.node.height;
         this.layerWith = this.node.width;
         for (let i = 0; i < this.item.length; i++) {
-            this.itemNode[i] = cc.instantiate(this.item[i]);
+            this.itemNode[i] = cc.instantiate(this.item[i]);        
         }
         this.node.on('srollview-init', this.init, this);
         this.node.on('srollview-update', this.updateList, this);
@@ -272,6 +275,8 @@ export default class TableView extends cc.Component {
         item.parent = this.content;
         item.pfbType = pfbType;
         item.index = i;
+        if(this.isHideAllChild)
+            item.active = false;
         if (this.direction == Direction.vertical) {
             if (i === 0) {
                 item.y = 0;
@@ -582,17 +587,24 @@ export default class TableView extends cc.Component {
 
     public getItemByIndexAndCount(index: number, count: number)
     {
-        const itemArray: Array<cc.Node> = [];
-        for(let i = 0; i != count; ++i){
-            for(let j = 0; j != this.itemArr.length; ++j)
-            {
-                if(this.itemArr[j].index == (index +i))
+        const itemArray: Array<any> = [];
+        for(let j = 0; j != this.itemArr.length; ++j)
+        {
+            let isCheckSuccess = false;
+            for(let i = index; i != (index + count); ++i){
+                if(this.itemArr[j].index == i)
                 {
                     itemArray.push(this.itemArr[j]);
+                    isCheckSuccess = true;
                     break;
                 }
-            }
+                if(!isCheckSuccess)
+                {
+                    this.itemArr[j].active = true;
+                }
+            }     
         }
+        
         return itemArray;
     }
 

+ 1 - 1
assets/script/game/module/login/Login.ts

@@ -105,7 +105,7 @@ export default class Login extends cc.Component {
     /** 设置进度 */
     private setProgress(current) {
         this.bar.setProgress(current);
-        this.lbl_progress.string = "加载不消耗流量 " + current + "%";
+        this.lbl_progress.string = "加载 " + current + "%";
     }
 
     /** 初始化 */

+ 18 - 12
assets/script/game/module/sign/Sign.ts

@@ -45,18 +45,24 @@ export default class Sign extends cc.Component {
         let index = gData.sign.getItemIndexByCanSign();
         if (index > 0)
             index -= 1;
-        this.tableview.contentMoveByIndex(index, 0.1);
-
-        // cc.tween(this.node).delay(0.16).call(()=>{
-        //     let allItem = this.tableview.getItemByIndexAndCount(index, 3);
-
-        //     for(let i = 0; i != allItem.length; ++i)
-        //     {
-        //         allItem[i].setPosition(allItem[i].position.x, allItem[i].position.y - 500);
-        //         cc.tween(allItem[i]).by(0.2 + 0.1*i, {y: 500});
-        //     }
-        //     console.log("---");
-        // }).start();
+        //index = 4;
+        this.tableview.contentMoveByIndex(index, 0.01);
+
+        cc.tween(this.node).delay(0.2).call(()=>{
+            let allItem = this.tableview.getItemByIndexAndCount(index, 3);
+            allItem && allItem.sort((a, b)=>{
+
+                return a.index - b.index;
+            })
+
+            for(let i = 0; i != allItem.length; ++i)
+            {
+                allItem[i].active = true;
+                allItem[i].setPosition(allItem[i].position.x, allItem[i].position.y - 600);
+                cc.tween(allItem[i]).delay(i*0.1).by(0.3, {y: 600}, cc.easeSineOut()).start();
+            }
+            console.log("---");
+        }).start();
         
     }
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików