Browse Source

Merge branch 'master' of http://120.92.132.192:23541/TDGame/TDGameClient3D

xiejing 4 years ago
parent
commit
0f70051282

File diff suppressed because it is too large
+ 27 - 5167
assets/resources/ui/GameOverUI.prefab


File diff suppressed because it is too large
+ 19 - 13304
assets/resources/ui/PrepareUI.prefab


+ 579 - 0
assets/resources/ui/ads/ExportItem.prefab

@@ -0,0 +1,579 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "DaochuItemUI",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 10
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 15
+      },
+      {
+        "__id__": 16
+      },
+      {
+        "__id__": 17
+      }
+    ],
+    "_prefab": {
+      "__id__": 18
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "BG",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 32.826,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransformComponent",
+    "_name": "BG<UITransformComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_priority": 0,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 180,
+      "height": 180
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.SpriteComponent",
+    "_name": "BG<SpriteComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_sharedMaterial": null,
+    "_spriteFrame": {
+      "__uuid__": "ad575607-a07e-453a-ad61-896cc376e54f@f9941"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "f90nw719lHtbHoTWZ+zdxH",
+    "sync": false,
+    "_synced": {
+      "default": false,
+      "serializable": false
+    }
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "IconDaochu",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 35.296,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_layer": 1073741824,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransformComponent",
+    "_name": "IconDaochu<UITransformComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_priority": 0,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 160,
+      "height": 160
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.SpriteComponent",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_sharedMaterial": null,
+    "_spriteFrame": null,
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "57OCmntdFL5rwJxQVhWkvn",
+    "sync": false,
+    "_synced": {
+      "default": false,
+      "serializable": false
+    }
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 11
+      },
+      {
+        "__id__": 12
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -91.996,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransformComponent",
+    "_name": "Label<UITransformComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "_priority": 0,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 180,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelComponent",
+    "_name": "Label<LabelComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_sharedMaterial": null,
+    "_useOriginalSize": true,
+    "_string": "游戏名有七个字",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 24,
+    "_fontSize": 24,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 1,
+    "_enableWrapText": false,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "acKcW2rXlEmZdUiyTrtWD9",
+    "sync": false,
+    "_synced": {
+      "default": false,
+      "serializable": false
+    }
+  },
+  {
+    "__type__": "cc.UITransformComponent",
+    "_name": "ButtonDaochu1<UITransformComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_priority": 0,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 198,
+      "height": 262
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.SpriteComponent",
+    "_name": "ButtonDaochu1<SpriteComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_sharedMaterial": null,
+    "_spriteFrame": {
+      "__uuid__": "6d7dc25c-94ca-4208-9cb9-894a327fc8ed@f9941"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ButtonComponent",
+    "_name": "ButtonDaochu1<ButtonComponent>",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 2,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": {
+      "__uuid__": "6d7dc25c-94ca-4208-9cb9-894a327fc8ed@f9941"
+    },
+    "_hoverSprite": {
+      "__uuid__": "6d7dc25c-94ca-4208-9cb9-894a327fc8ed@f9941"
+    },
+    "_pressedSprite": {
+      "__uuid__": "6d7dc25c-94ca-4208-9cb9-894a327fc8ed@f9941"
+    },
+    "_disabledSprite": {
+      "__uuid__": "6d7dc25c-94ca-4208-9cb9-894a327fc8ed@f9941"
+    },
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": {
+      "__id__": 1
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "89bf827dnVIrYRVh5P9587o",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "icon": {
+      "__id__": 8
+    },
+    "label": {
+      "__id__": 12
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "6aIR2E26VCYaMkSRKuebbZ",
+    "sync": false,
+    "_synced": {
+      "default": false,
+      "serializable": false
+    }
+  }
+]

+ 11 - 0
assets/resources/ui/ads/ExportItem.prefab.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "1.0.29",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "a35d4a29-693b-410b-bc10-5cce31760afd",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

File diff suppressed because it is too large
+ 51 - 1572
assets/resources/ui/ads/SudokuOutput.prefab


+ 133 - 7
assets/resources/ui/components/WeaponCell.prefab

@@ -36,19 +36,22 @@
       },
       {
         "__id__": 30
+      },
+      {
+        "__id__": 34
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 34
+        "__id__": 38
       },
       {
-        "__id__": 35
+        "__id__": 39
       }
     ],
     "_prefab": {
-      "__id__": 36
+      "__id__": 40
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -944,8 +947,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -77.398,
-      "y": -58.587,
+      "x": -46.141,
+      "y": -57.128,
       "z": 0
     },
     "_lrot": {
@@ -981,7 +984,7 @@
     "_priority": 0,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 92.29,
+      "width": 55.62,
       "height": 50.4
     },
     "_anchorPoint": {
@@ -1010,7 +1013,7 @@
     },
     "_sharedMaterial": null,
     "_useOriginalSize": true,
-    "_string": "10000/5秒",
+    "_string": "10000",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 20,
@@ -1042,6 +1045,126 @@
       "serializable": false
     }
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "goldIcon",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 35
+      },
+      {
+        "__id__": 36
+      }
+    ],
+    "_prefab": {
+      "__id__": 37
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -64.184,
+      "y": -30.633,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 0.5,
+      "y": 0.5,
+      "z": 0.5
+    },
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransformComponent",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 34
+    },
+    "_enabled": true,
+    "_priority": 0,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 50,
+      "height": 49
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.SpriteComponent",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 34
+    },
+    "_enabled": true,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_sharedMaterial": null,
+    "_spriteFrame": {
+      "__uuid__": "0b44fc8c-d664-46d8-bddf-1514caec8e51@f9941"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "15/eLucf1E9JHuuW9Gs0b6",
+    "sync": false,
+    "_synced": {
+      "default": false,
+      "serializable": false
+    }
+  },
   {
     "__type__": "cc.UITransformComponent",
     "_name": "ButtonGun01<UITransformComponent>",
@@ -1077,6 +1200,9 @@
     "iconLoader": {
       "__id__": 16
     },
+    "goldIconLoader": {
+      "__id__": 36
+    },
     "imgState1": {
       "__id__": 2
     },

+ 9 - 0
assets/scripts/engines/gui/list.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "0.0.1",
+  "importer": "*",
+  "imported": true,
+  "uuid": "aa6e6ca4-fc6b-4bb3-bd67-a5f3b7f9dfc7",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 75 - 0
assets/scripts/engines/gui/list/ExportItem.ts

@@ -0,0 +1,75 @@
+import { Component, EventTouch, ImageAsset, LabelComponent, loader, Node, SpriteComponent, SpriteFrame, _decorator } from 'cc';
+import { LiangLiangSDK } from '../../../libs/liangliangSDK';
+const { ccclass, property } = _decorator;
+
+@ccclass('ExportItem')
+export class ExportItem extends Component {
+    
+    @property({
+        type:SpriteComponent,
+        tooltip:"图片"
+    })
+    icon:SpriteComponent=null;
+
+    @property({
+        type:LabelComponent,
+        tooltip:"图片"
+    })
+    label:LabelComponent=null;
+
+    data:any;
+
+    start () {
+        this.node.on(Node.EventType.TOUCH_START,this.__itemTouchStart.bind(this),this);
+    }
+
+    updateItem(data:any):void{
+        this.data=data;
+        this.label.string=this.data.link_name;
+        loader.load(this.data.link_img,this.__loadProgress.bind(this),this.__loadComplete.bind(this));
+    }
+
+    private __loadProgress(...arg):void{
+        
+    }
+
+    private __itemTouchStart(touch:EventTouch):void{
+        let self = this;
+        if(this.wx!=null)
+        {
+            this.wx.navigateToMiniProgram({
+                appId: this.data.app_id,
+                path: this.data.app_path,
+                success: (res) => 
+                {
+                    LiangLiangSDK.CpaReport(self.data);
+                },
+                fail: (res) => {
+                    console.log("跳转失败!");
+                },
+                complete: (res) => {},
+            });
+        }
+        else
+        {
+            console.log("点中了图标 : " + this.data.name);
+        }
+    }
+
+    private get wx():any{
+        return window["wx"];
+    }
+
+    private __loadComplete(err:Error,texture:ImageAsset):void{
+        if(err){
+            console.log(err);
+            return;
+        }
+        let frame:SpriteFrame=new SpriteFrame();
+        frame.texture=texture._texture;
+        this.icon.spriteFrame=frame;
+    }
+    // update (deltaTime: number) {
+    //     // Your update function goes here.
+    // }
+}

+ 15 - 0
assets/scripts/engines/gui/list/ExportItem.ts.meta

@@ -0,0 +1,15 @@
+{
+  "ver": "2.0.14",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "89bf8dbb-7675-48ad-8455-8793fde7cee8",
+  "files": [
+    ".js",
+    ".trans"
+  ],
+  "subMetas": {},
+  "userData": {
+    "importAsPlugin": false,
+    "moduleId": "project:///assets/scripts/engines/gui/list/ExportItem.js"
+  }
+}

+ 160 - 0
assets/scripts/engines/gui/list/ExportList.ts

@@ -0,0 +1,160 @@
+import { CCBoolean, CCInteger, CCObject, Component, Enum, find, instantiate, Node, Prefab, ScrollViewComponent, _decorator } from 'cc';
+import { LiangLiangSDK } from '../../../libs/liangliangSDK';
+import { ExportItem } from './ExportItem';
+const { ccclass, property } = _decorator;
+
+export enum ScrollType {
+    Horizontal = 1,
+    Vertical = 2
+}
+
+@ccclass('ExportList')
+export class ExportList extends Component {
+
+    @property({
+        type: ScrollViewComponent,
+        tooltip: "项预制体"
+    })
+    scrollView: ScrollViewComponent = null;
+
+    @property({
+        type: Node,
+        tooltip: "项预制体"
+    })
+    content: Node = null;
+
+    @property({
+        type: Prefab,
+        tooltip: "项预制体"
+    })
+    itemPrefab: Prefab = null;
+
+    @property({
+        type: Enum(ScrollType),
+        tooltip: "滚动方式"
+    })
+    scrollType: ScrollType = ScrollType.Horizontal;
+
+    @property({
+        type: CCBoolean,
+        tooltip: "是否开启自动滚动"
+    })
+    autoScroll:Boolean = true;
+    
+    @property({
+        type: CCInteger,
+        tooltip: "滚动速度"
+    })
+    scrollSpeed: number = 50;
+
+    //前进还是后退
+    isAdvance: boolean = true;
+
+    /**
+     * 是否在手动拖拽中
+     */
+    isHandScroll: boolean = false;
+
+    private __items: ExportItem[];
+    start() {
+        this.scrollView.node.on('scroll-began', this.onScrollbegin, this);
+        this.scrollView.node.on('scroll-ended', this.onScrollend, this);
+        this.scrollView.node.on('scrolling', this.onScrolling, this);
+
+        this.updataList();
+    }
+    
+    updataList(): void {
+        //删除老的内容
+        this.content.removeAllChildren();
+        this.__items = [];
+        let adList: any[] = LiangLiangSDK.GetList(20);
+        console.log("更新导出列表", adList);
+        let itemNode: Node;
+        let item: ExportItem;
+        let data: any;
+        for (let index = 0; index < adList.length; index++) {
+            data = adList[index];
+            itemNode = instantiate(this.itemPrefab);
+            item = itemNode.getComponent(ExportItem);
+            this.__items.push(item);
+            this.content.addChild(itemNode);
+            item.updateItem(data);
+        }
+        this.scrollView.scheduleOnce(this.__scroll.bind(this), 0.1);
+    }
+
+    /**
+     * 滚动开始
+     * @param scrollView 
+     */
+    private onScrollbegin(scrollView): void {
+        this.scrollView.stopAutoScroll();
+    }
+
+    /**
+     * 滚动结束
+     * @param scrollView 
+     */
+    private onScrollend(scrollView): void {
+        //手动控制
+        if (this.isHandScroll) {
+            this.scheduleOnce(this.__scroll.bind(this), 1);
+        } else {
+            this.isAdvance = !this.isAdvance;
+            this.scheduleOnce(this.__scroll.bind(this), 3.0);
+        }
+        this.isHandScroll = false;
+    }
+
+    private __scroll(): void {
+        let second: number;
+        if (this.isAdvance) {
+            if (this.scrollType == ScrollType.Horizontal) {
+                second = (this.scrollView.getMaxScrollOffset().x - Math.abs(this.scrollView.getScrollOffset().x)) / this.scrollSpeed;
+            } else {
+                second = (this.scrollView.getMaxScrollOffset().y - Math.abs(this.scrollView.getScrollOffset().y)) / this.scrollSpeed;
+            }
+            if (second > 0) {
+                if (this.scrollType == ScrollType.Horizontal) {
+                    this.scrollView.scrollToRight(second, false);
+                } else {
+                    this.scrollView.scrollToBottom(second, false);
+                }
+            }
+            else {
+                this.onScrollend(null);
+            }
+        }
+        else {
+            if (this.scrollType == ScrollType.Horizontal) {
+                second = Math.abs(this.scrollView.getScrollOffset().x) / this.scrollSpeed;
+            } else {
+                second = Math.abs(this.scrollView.getScrollOffset().y) / this.scrollSpeed;
+            }
+            if (second > 0) {
+                if (this.scrollType == ScrollType.Horizontal) {
+                    this.scrollView.scrollToLeft(second, false);
+                } else {
+                    this.scrollView.scrollToTop(second, false);
+                }
+            }
+            else {
+                this.onScrollend(null);
+            }
+        }
+    }
+    /**
+     * 滚动中
+     * @param scrollView 
+     */
+    private onScrolling(scrollView): void {
+        if (this.scrollView.isScrolling()) {
+            this.isHandScroll = true;
+        }
+    }
+
+    update(deltaTime: number) {
+
+    }
+}

+ 15 - 0
assets/scripts/engines/gui/list/ExportList.ts.meta

@@ -0,0 +1,15 @@
+{
+  "ver": "2.0.14",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "c08621a0-108b-4ce5-8525-50b4e32d1ea8",
+  "files": [
+    ".js",
+    ".trans"
+  ],
+  "subMetas": {},
+  "userData": {
+    "importAsPlugin": false,
+    "moduleId": "project:///assets/scripts/engines/gui/list/ExportList.js"
+  }
+}

+ 21 - 4
assets/scripts/games/scenes/PreloadingScene.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Node, game, find, loader, JsonAsset, Prefab } from 'cc';
+import { _decorator, Component, Node, game, find, loader, JsonAsset, Prefab, sys } from 'cc';
 import { LayerManager } from '../../engines/gui/LayerManager';
 import { UIConst } from '../ui/UIConst';
 import { LoadingView } from '../../engines/loadingView/LoadingView';
@@ -7,6 +7,7 @@ import { GameModel } from '../models/GameModel';
 import GameConfigManager from '../models/GameConfigManager';
 import { WeaponCell } from '../models/weapons/WeaponCell';
 import { NoticeManager } from '../../engines/notices/NoticeManager';
+import { LiangLiangSDK } from '../../libs/liangliangSDK';
 const { ccclass, property } = _decorator;
 
 @ccclass('PreloadingScene')
@@ -54,10 +55,26 @@ export class PreloadingScene extends Component {
     }
 
     private initAds():void{
-        // GameModel.single.ClearLocalData();
-        GameModel.single.gameName="gregGame";
-        GameModel.single.userId="guest";
+        if(sys.isBrowser){
+            GameModel.single.gameName="GregGame"
+            GameModel.single.userId="Guest";
+            if(window["wx"]){
+                this.LoadSubPackage();
+            }else{
+                this.LoadConfigs();
+            }
+        }else if(sys.isMobile){
+            LiangLiangSDK.Init(()=>{
+                this.AdsComplete();
+            },()=>{
+               this.AdsComplete();
+            })
+        }
+    }
 
+    private AdsComplete():void{
+        GameModel.single.gameName=LiangLiangSDK.gameName;
+        GameModel.single.userId=LiangLiangSDK.userID;
         if(window["wx"]){
             this.LoadSubPackage();
         }else{

+ 4 - 4
assets/scripts/games/ui/fightings/GameController.ts

@@ -161,10 +161,6 @@ export class GameController extends EventDispatcher{
      * 开始下一关
      */
     PlayNextLevel():void{
-        GameModel.single.currentLevel++;
-        if(GameModel.single.currentLevel>=GameConfigManager.MaxLevel){
-            GameModel.single.currentLevel=GameConfigManager.MaxLevel;
-        }
         console.log(GameModel.single.currentLevel);
         this.StartGame();
         GUIManager.single.Show(UIConst.FIGHTING_UI);
@@ -259,6 +255,10 @@ export class GameController extends EventDispatcher{
         if(this.monstersConfig.length==0&&this.leftMonsterList.length==0&&this.middleMonsterList.length==0&&this.rightMonsterList.length==0){
             //全部怪物死亡
             console.log("通关");
+            GameModel.single.currentLevel++;
+            if(GameModel.single.currentLevel>=GameConfigManager.MaxLevel){
+                GameModel.single.currentLevel=GameConfigManager.MaxLevel;
+            }
             this.ClearMonsters();
             this.GameOver=true;
             GUIManager.single.Show(UIConst.GAME_OVER_UI,true);

+ 1 - 1
assets/scripts/games/ui/gameovers/GameOverMediator.ts

@@ -15,7 +15,7 @@ export class GameOverMediator extends GUIMediator {
     DefeatedGroup:Node=null;
 
     onLoad(){
-
+        
     }
 
     OnShow(data?:any):void{

+ 8 - 0
assets/scripts/games/ui/prepares/PrepareMediator.ts

@@ -97,6 +97,14 @@ export class PrepareMediator extends GUIMediator {
     })
     equipWeaponNode:Node=null;
 
+    /**
+     * 装配格子预制体
+     */
+    @property({
+        type:Prefab
+    })
+    WeaponCellPrefab:Prefab=null;
+
     /**
      * 武器列表
      */

+ 8 - 2
assets/scripts/games/ui/prepares/WeaponCellListView.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Node, EventTouch, LayoutComponent, Vec2, Rect, Size, Vec3, loader } from 'cc';
+import { _decorator, Component, Node, EventTouch, LayoutComponent, Vec2, Rect, Size, Vec3, loader, instantiate } from 'cc';
 import { BaseView } from '../../../engines/gui/BaseView';
 import { GUIMediator } from '../../../engines/gui/GUIMediator';
 import { DataModelEventType } from '../../../engines/models/DataModelEventType';
@@ -53,10 +53,16 @@ export class WeaponCellListView extends BaseView{
      * 刷新武器列表
      */
     private RefreshWeaponList():void{
-        let list:WeaponCell[]=GameModel.single.weaponCells;
         let weaponCell:WeaponCell;
         let weaponCellView:Node;
         let weaponCellScript:WeaponCellScript;
+        if(this.weaponList.node.children.length!=12){
+            for (let index = 0; index < 12; index++) {
+                weaponCellView=instantiate(this.mediator.WeaponCellPrefab);
+                this.weaponList.node.addChild(weaponCellView);
+            }   
+        }
+        let list:WeaponCell[]=GameModel.single.weaponCells;
         for (let index = 0; index < list.length; index++) {
             weaponCell = list[index];
             weaponCellView=this.weaponList.node.children[index];

+ 8 - 1
assets/scripts/games/ui/prepares/WeaponCellScript.ts

@@ -19,6 +19,11 @@ export class WeaponCellScript extends Component {
     })
     iconLoader:SpriteComponent=null;
 
+    @property({
+        type:SpriteComponent
+    })
+    goldIconLoader:SpriteComponent=null;
+
     
     @property({
         type:Node
@@ -94,11 +99,13 @@ export class WeaponCellScript extends Component {
             this.labelGroup.active=false;
             this.levelLabel.string="";
             this.iconLoader.spriteFrame=null;
+            this.goldIconLoader.node.active=false;
         }else{
+            this.goldIconLoader.node.active=true;
             this.weaponConfig=GameConfigManager.GetWeaponConfig(this.weaponCell.weaponId);
             //收益
             this.earningsLabel.node.active=true;
-            this.earningsLabel.string=this.weaponConfig.earnings+"/"+((GameModel.single.earningsInterval)/1000).toFixed(0)+"秒";
+            this.earningsLabel.string=Math.floor(this.weaponConfig.earnings*(GameModel.single.earningsInterval/1000)).toString();
             //等级
             this.labelGroup.active=true;
             if(GameConfigManager.WeaponIsMaxLevel(this.weaponCell.weaponId)){

+ 117 - 0
assets/scripts/libs/JumpIcon.ts

@@ -0,0 +1,117 @@
+import { LabelComponent, Node, SpriteComponent, SpriteFrame } from "cc";
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
+
+import { LiangLiangSDK } from "./liangliangSDK";
+
+const {ccclass, property} = cc._decorator;
+
+interface JumpData
+{
+    icon:string,
+    app_id : string,
+    game_id : string,
+    big_icon: string,
+    app_path: string,
+    skipIcon: boolean;
+    name:string;
+}
+
+var wx = window["wx"];
+
+@ccclass
+export default class JumpIcon extends cc.Component 
+{
+
+    static _allspriteFrame :{[key:string]:SpriteFrame} = {};
+
+    @property({
+        type:SpriteComponent
+    })
+    sprite:SpriteComponent=null;
+
+    @property({
+        type:LabelComponent
+    })
+    nameLabel:LabelComponent = null;
+
+    _data: JumpData; 
+
+    Init(data:JumpData)
+    {
+        this._data = data;
+        if(!this._data.skipIcon)
+        {
+            var iconname = data.icon;
+            if(this.sprite.node.width > 196 )
+            {
+                iconname = data.big_icon;
+            }
+
+            if(JumpIcon._allspriteFrame[iconname])   
+            {
+                this.sprite.spriteFrame = JumpIcon._allspriteFrame[iconname];
+            }
+            else
+            {
+                let self = this;
+                cc.loader.load(iconname, (err, texture) =>
+                {                   
+                    if (texture && !err)
+                    {
+                        var spriteFrame = new cc.SpriteFrame(texture);
+                        JumpIcon._allspriteFrame[iconname] = spriteFrame;
+                        self.sprite.spriteFrame = spriteFrame;
+                    }
+                });
+            }
+        }     
+        this.nameLabel.string = this._data.name;
+    }
+
+    start ()
+    {
+
+    }
+
+    update (dt) 
+    {
+
+    }
+
+    onEnable()
+    {
+        this.node.on(Node.EventType.TOUCH_START, this.onTouchStartCallback, this, true);
+    }
+
+    onDisable()
+    {
+        this.node.off(Node.EventType.TOUCH_START, this.onTouchStartCallback, this, true);
+    }
+
+    onTouchStartCallback()
+    {
+        let self = this;
+        if(window[wx]!=null)
+        {
+            wx.navigateToMiniProgram({
+                appId: this._data.app_id,
+                path: this._data.app_path,
+                success: (res) => 
+                {
+                    LiangLiangSDK.CpaReport(self._data);
+                },
+                fail: (res) => {},
+                complete: (res) => {},
+            });
+        }
+        else
+        {
+            console.log("点中了图标 : " + this._data.name);
+        }
+    }
+}

+ 15 - 0
assets/scripts/libs/JumpIcon.ts.meta

@@ -0,0 +1,15 @@
+{
+  "ver": "2.0.14",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "d463f254-efa6-48be-b60d-24ca319cf9eb",
+  "files": [
+    ".js",
+    ".trans"
+  ],
+  "subMetas": {},
+  "userData": {
+    "importAsPlugin": false,
+    "moduleId": "project:///assets/scripts/libs/JumpIcon.js"
+  }
+}

+ 313 - 0
assets/scripts/libs/liangliangSDK.ts

@@ -0,0 +1,313 @@
+import { sys } from "cc";
+
+
+
+
+export  class LiangLiangSDK
+{
+    static wx:any;
+    static currentSDK = "1.0.2";
+    static gameID = 10003;
+    static gameName="HaiDaoBaoWei";
+
+    static userID; 
+    static token;
+    static _ok = false;
+    static _initOK = false;
+    static _loginOK = false;
+    static _listOK = false;
+    static _config ;
+
+    private  static _checkOK()
+    {
+        if(LiangLiangSDK._initOK &&LiangLiangSDK._loginOK && LiangLiangSDK._listOK )
+        {
+            LiangLiangSDK._ok = true;
+        }
+    }
+
+    /**
+     * 初始化
+     * @param successcallback
+     * @param failcallback 
+     */
+    static Init(successcallback,failcallback)
+    {
+        this.wx=window["wx"];
+        LiangLiangSDK.HttpRequest("https://www.zhiyuonline.com/api/getGameInfo",{"gameId": this.gameID,"version":this.currentSDK},"POST",(result)=>
+        {
+            console.log(result);
+            LiangLiangSDK._config = result.data;
+
+            LiangLiangSDK._initOK = true; 
+            LiangLiangSDK._checkOK();
+            this.Login(()=>{
+                console.log("登录成功");
+                this.LoadIconDataList(()=>{
+                    console.log("加载互导数据成功:"+this._data);
+                    successcallback();
+                },()=>{ 
+                    console.log("加载互导数据失败");
+                    successcallback();
+                })
+            },()=>{
+                console.log("登录失败");
+                failcallback();
+            })
+ 
+        },(fail)=>
+        {
+            console.log("fail : " + fail)
+            failcallback();
+        })
+    }
+
+    static Login(successcallback,failcallback)
+    {
+        let self = this;
+        if(this.wx)
+        {
+            this.wx.login({
+                success (res) 
+                {
+                    if (res.code)
+                    {
+                        let option=this.wx.getLaunchOptionsSync();
+                        if(option==null){
+                            throw new Error("调用 wx.getLaunchOptionsSync 获取数据为空!");
+                        }
+						let channelId = 0;
+						if (option.query && JSON.stringify(option.query) != "{}") {
+							if (option.query.channel_id) {
+								channelId = Number(option.query.channel_id);
+							}
+						}
+                        LiangLiangSDK.HttpRequest("https://www.zhiyuonline.com/user/login",{"gameId": this.gameID,"code":res.code,"channelId" : channelId},"POST",(result)=>
+                        {
+                            console.log(result);
+                            self.userID = result.data.userId;
+                            self.token = result.data.token;
+                            LiangLiangSDK._loginOK = true;
+
+                            LiangLiangSDK._checkOK();
+
+                            successcallback();
+                        },(fail)=>
+                        {
+                            console.log("fail : " + fail)
+                            failcallback();
+                        })
+                    } 
+                    else 
+                    {
+                        console.log('登录失败!' + res.errMsg)
+                        failcallback();
+                    }
+                }
+            })
+        }
+        else
+        {
+            LiangLiangSDK._loginOK = true;
+            LiangLiangSDK._checkOK();
+        }
+    }
+
+    static _data:any[];
+    private static _errorIndex:number=0;
+    private static _errorTotal:number=3;
+    static LoadIconDataList(successcallback,failcallback)
+    {
+        this._LoadIconDataList(()=>{
+            successcallback();
+        },()=>{
+            if(this._errorIndex<this._errorTotal){
+                this.LoadIconDataList(successcallback,failcallback);
+                this._errorIndex++;
+            }else{
+                failcallback();
+            }
+        });
+    }
+
+    private static _LoadIconDataList(successcallback,failcallback):void{
+        if(this.wx!=null)
+        {
+            var url = "https://www.maoxingame.com/"+this.gameName+"/wx_server/xl_sdk_resources/xl_channel_app_config.json";
+            cc.loader.load(url, function (err, data) 
+            {
+    
+                if(err)
+                {
+                    console.error(err)
+                    failcallback();
+                }
+                else
+                {
+                    LiangLiangSDK._listOK = true;
+                    LiangLiangSDK._checkOK();
+                    LiangLiangSDK._data = data;
+                    successcallback();
+                }
+                console.log(data);
+            });    
+        }
+        else
+        {
+            LiangLiangSDK._listOK = true;
+            LiangLiangSDK._checkOK();
+            LiangLiangSDK._data = [{
+                app_id:"",
+                skipIcon:true,
+                name:"一个测试名字"
+            }];
+        }
+    }
+
+    static HttpRequest(url, data, method, success, fail)
+    {
+/*        if(CC_WECHATGAME1)
+        {
+            wx.request({
+                url: url, //仅为示例,并非真实的接口地址
+                data: data,
+                header: {
+                  'content-type': 'application/json' // 默认值
+                },
+                success (res) {
+                  console.log(res.data)
+                },
+                fail(res)
+                {
+                    console.log("HttpRequest Fail" + res);
+                }
+              })
+        }
+        else*/
+        {
+            var xhr = new XMLHttpRequest();
+            xhr.onreadystatechange = function () {
+                if (xhr.readyState == 4) {
+                    var response = xhr.responseText;
+                    if (xhr.status >= 200 && xhr.status < 400) {
+                        var result = {};
+                        if(response)
+                        {
+                            try {
+                                result = JSON.parse(response)
+                            } catch (e) {
+                                console.error('json parse error ', response)
+                                if (fail)
+                                    fail(e);
+                            }    
+                        }
+                        if (success)
+                            success(result);
+                    } else {
+                        console.error('error ', response)
+                        if (fail)
+                            fail(response);
+                    }
+                } else {
+                }
+            };
+            xhr.timeout = 3000;
+            xhr.ontimeout = function (event) {
+                console.error('error ', event)
+                if (fail)
+                    fail(event);
+            }
+            xhr.open(method, url, true);
+            if (method == "POST") {
+                xhr.open('POST', url);
+                xhr.setRequestHeader("Content-Type", "application/json");
+                xhr.send(JSON.stringify(data));
+            } else {
+                xhr.send();
+            }
+        }
+
+    }
+
+    static object2Query(obj) 
+    {
+        var args = []
+        for (var k in obj)
+            args.push(k + "=" + obj[k])
+        return args.join("&"); // 返回对象  
+    }
+
+
+    static CpaReport(data)
+    {
+        var body:any = {};
+        body.gameId = this.gameID;
+        body.token = LiangLiangSDK.token;
+        body.cpaId = data.game_id
+        console.log("开始上报跳转数据" + JSON.stringify(body));
+        LiangLiangSDK.HttpRequest("https://www.zhiyuonline.com/user/cpaClick",body, "POST",()=>{}, ()=>{});
+    }
+
+    static GetList(count:number):any[]
+    {
+        if(!LiangLiangSDK._ok)  //如果服务器请求错误 则直接返回一个空的列表
+        {
+            return [];
+        }
+        var ret = [];
+        for(var i = 0;i < count;i++)
+        {
+            ret.push(LiangLiangSDK._data[Math.floor(Math.random() * LiangLiangSDK._data.length * 0.99999)]);
+        }
+        return ret;
+    }
+
+    static CanJumpOut():boolean
+    {
+        if(!LiangLiangSDK._config)
+        {
+            return false;
+        }
+        if(this.currentSDK != LiangLiangSDK._config.version)
+        {
+            return false;
+        }
+        {
+            if(!LiangLiangSDK._ok)
+            {
+                console.log("不允许跳转1")
+                return false;
+            }
+            if(!LiangLiangSDK._data || LiangLiangSDK._data.length == 0)
+            {
+                console.log("不允许跳转2")
+                return false;
+            }
+            console.log("允许跳转")
+            return true
+        }
+        return false;
+    }
+
+    static CanWuChu():boolean
+    {
+        if(!LiangLiangSDK._config)
+        {
+            return false;
+        }
+        if(this.currentSDK != LiangLiangSDK._config.version)
+        {
+            return false;
+        }
+        if(!LiangLiangSDK._config.mistakeSwitch)
+        {
+            return false;
+        }
+        //上海forbidSwitch   为true
+        if(LiangLiangSDK._config.forbidSwitch)
+        {
+            return false;
+        }
+        return true;
+    }
+}

+ 15 - 0
assets/scripts/libs/liangliangSDK.ts.meta

@@ -0,0 +1,15 @@
+{
+  "ver": "2.0.14",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "3b282fbb-43e5-4e31-b888-409830e28924",
+  "files": [
+    ".js",
+    ".trans"
+  ],
+  "subMetas": {},
+  "userData": {
+    "importAsPlugin": false,
+    "moduleId": "project:///assets/scripts/libs/liangliangSDK.js"
+  }
+}

Some files were not shown because too many files changed in this diff