Jelajahi Sumber

Merge branch 'master' of http://git.mokasz.com/zouyong/tower_sanguo

kaka 5 tahun lalu
induk
melakukan
a309b66fc6
37 mengubah file dengan 1390 tambahan dan 1707 penghapusan
  1. 30 0
      tower_sanguo/assets/MOKA/util/Utils.ts
  2. 29 0
      tower_sanguo/assets/resources/animation/drawLight.anim
  3. 5 0
      tower_sanguo/assets/resources/animation/drawLight.anim.meta
  4. TEMPAT SAMPAH
      tower_sanguo/assets/resources/data/1.bin
  5. 2 1
      tower_sanguo/assets/resources/data/db_data.json
  6. 202 101
      tower_sanguo/assets/resources/data/mission_data.json
  7. 7 13
      tower_sanguo/assets/resources/data/openfun_data.json
  8. 5 4
      tower_sanguo/assets/resources/data/serverConfig_data.json
  9. 4 4
      tower_sanguo/assets/resources/data/turntable_data.json
  10. 258 126
      tower_sanguo/assets/resources/module/drawRecruit/drawGeneral.prefab
  11. 9 486
      tower_sanguo/assets/resources/module/drawRecruit/drawRecruit.prefab
  12. TEMPAT SAMPAH
      tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang_light.png
  13. 36 0
      tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang_light.png.meta
  14. 139 161
      tower_sanguo/assets/resources/module/fight/fight.prefab
  15. TEMPAT SAMPAH
      tower_sanguo/assets/resources/module/fight/prefab_texture/check_point_bg.png
  16. 36 0
      tower_sanguo/assets/resources/module/fight/prefab_texture/check_point_bg.png.meta
  17. 0 0
      tower_sanguo/assets/resources/module/fight/spine/bing_die.json
  18. 122 110
      tower_sanguo/assets/resources/module/getLiangCao/get_liangcao.prefab
  19. 160 636
      tower_sanguo/assets/scenes/Test_Znh.fire
  20. 0 4
      tower_sanguo/assets/scripts/GameController.ts
  21. 5 2
      tower_sanguo/assets/scripts/data/GameData.ts
  22. 2 0
      tower_sanguo/assets/scripts/data/GameDefinition.ts
  23. 2 0
      tower_sanguo/assets/scripts/manager/XXConst.ts
  24. 1 1
      tower_sanguo/assets/scripts/module/checkpointRedBag/CheckpointRedBagBtn.ts
  25. 1 1
      tower_sanguo/assets/scripts/module/checkpointRedBag/CheckpointRedBagItem.ts
  26. 38 0
      tower_sanguo/assets/scripts/module/drawRecruit/DrawGeneralUI.ts
  27. 59 29
      tower_sanguo/assets/scripts/module/drawRecruit/DrawItem.ts
  28. 39 0
      tower_sanguo/assets/scripts/module/drawRecruit/DrawRecruitUI.ts
  29. 9 0
      tower_sanguo/assets/scripts/module/drawRecruit/DrawResultUI.ts
  30. 7 5
      tower_sanguo/assets/scripts/module/fight/FightUI.ts
  31. 63 6
      tower_sanguo/assets/scripts/module/getLiangCao/GetLiangCaoModel.ts
  32. 28 6
      tower_sanguo/assets/scripts/module/getLiangCao/GetLiangCaoUI.ts
  33. 30 8
      tower_sanguo/assets/scripts/module/main/MainUI.ts
  34. 57 0
      tower_sanguo/assets/scripts/net/HttpCommand.ts
  35. 1 1
      tower_sanguo/assets/scripts/net/servertest/ServerManager.ts
  36. 2 0
      tower_sanguo/assets/scripts/vo/MissionVO.ts
  37. 2 2
      tower_sanguo/assets/scripts/vo/PlayerVO.ts

+ 30 - 0
tower_sanguo/assets/MOKA/util/Utils.ts

@@ -365,6 +365,36 @@ export class Utils {
         //return { h: hour, m: minute, s: second };
     }
 
+    /**
+     * 物体震动
+    */
+    static ScreenShock(node: cc.Node, duration: number, callback: Function = null) {
+        let pos: cc.Vec2;
+        pos = cc.v2(node.x, node.y);
+
+        node.runAction(
+            cc.repeatForever(
+                cc.sequence(
+                    cc.moveTo(0.02, cc.v2(pos.x + 5, pos.y + 7)),
+                    cc.moveTo(0.02, cc.v2(pos.x + -6, pos.y + 7)),
+                    cc.moveTo(0.02, cc.v2(pos.x + -13, pos.y + 3)),
+                    cc.moveTo(0.02, cc.v2(pos.x + 3, pos.y + -6)),
+                    cc.moveTo(0.02, cc.v2(pos.x + -5, pos.y + 5)),
+                    cc.moveTo(0.02, cc.v2(pos.x + 2, pos.y + -8)),
+                    cc.moveTo(0.02, cc.v2(pos.x + -8, pos.y + -10)),
+                    cc.moveTo(0.02, cc.v2(pos.x + 3, pos.y + 10)),
+                    cc.moveTo(0.02, cc.v2(pos.x + 0, pos.y + 0))
+                )
+            )
+        );
+
+        setTimeout(() => {
+            node.stopAllActions();
+            node.setPosition(pos);
+            callback && callback();
+        }, duration * 1000);
+    }
+
     public static GetTimeLeft2BySecond(s: number): string {
         let hours = Math.round((s - 30 * 60) / (60 * 60));
         let minutes = Math.round((s - 30) / 60) % 60;

+ 29 - 0
tower_sanguo/assets/resources/animation/drawLight.anim

@@ -0,0 +1,29 @@
+{
+  "__type__": "cc.AnimationClip",
+  "_name": "drawLight",
+  "_objFlags": 0,
+  "_native": "",
+  "_duration": 2,
+  "sample": 30,
+  "speed": 1,
+  "wrapMode": 2,
+  "curveData": {
+    "props": {
+      "opacity": [
+        {
+          "frame": 0,
+          "value": 0
+        },
+        {
+          "frame": 1,
+          "value": 255
+        },
+        {
+          "frame": 2,
+          "value": 0
+        }
+      ]
+    }
+  },
+  "events": []
+}

+ 5 - 0
tower_sanguo/assets/resources/animation/drawLight.anim.meta

@@ -0,0 +1,5 @@
+{
+  "ver": "2.1.0",
+  "uuid": "7084d7fa-37f4-496d-9610-8544f0638951",
+  "subMetas": {}
+}

TEMPAT SAMPAH
tower_sanguo/assets/resources/data/1.bin


+ 2 - 1
tower_sanguo/assets/resources/data/db_data.json

@@ -7,7 +7,8 @@
         "barrack": 15,
         "mission_arrive": 41,
         "mission_passed": 0,
-        "prestige": 10000
+        "prestige": 10000,
+        "useserver":0
     },
     "generals": [
         {

File diff ditekan karena terlalu besar
+ 202 - 101
tower_sanguo/assets/resources/data/mission_data.json


+ 7 - 13
tower_sanguo/assets/resources/data/openfun_data.json

@@ -2,7 +2,7 @@
 	"1": {
 		"id": 1,
 		"name": "统帅台",
-		"openmission": 3,
+		"openmission": 5,
 		"btn_src": "btn_marshalstage",
 		"uiID": 1,
 		"ui_src": "marshalStageUI"
@@ -10,7 +10,7 @@
 	"2": {
 		"id": 2,
 		"name": "兵营",
-		"openmission": 5,
+		"openmission": 1,
 		"btn_src": "btn_barracks",
 		"uiID": 2,
 		"ui_src": "barracksUI"
@@ -18,14 +18,15 @@
 	"3": {
 		"id": 3,
 		"name": "武将",
-		"openmission": 7,
+		"openmission": 2,
 		"btn_src": "btn_general",
-		"uiID": 3
+		"uiID": 3,
+		"ui_src": "GeneralUI"
 	},
 	"4": {
 		"id": 4,
 		"name": "日常任务",
-		"openmission": 9,
+		"openmission": 3,
 		"btn_src": "btn_task",
 		"uiID": 4,
 		"ui_src": "TaskUI"
@@ -33,16 +34,9 @@
 	"5": {
 		"id": 5,
 		"name": "点将台",
-		"openmission": 7,
+		"openmission": 4,
 		"btn_src": "btn_getgeneral",
 		"uiID": 5,
 		"ui_src": "GetGeneralUI"
-	},
-	"6": {
-		"id": 6,
-		"name": "转盘",
-		"openmission": 8,
-		"uiID": 6,
-		"ui_src": "GetGeneralUI"
 	}
 }

+ 5 - 4
tower_sanguo/assets/resources/data/serverConfig_data.json

@@ -7,10 +7,10 @@
 	"initHero": "111001,111002,111003,111004,112005,112006,112007,112008,113009,113010,113011,113012,113013,113014,113015,114016,121001,121002,122003,122004,122005,122006,123007,123008,123009,123010,123011,123012,123013,124014,131001,131002,131003,132004,132005,132006,132007,133008,133009,133010,133011,133012,133013,134014,141001,141002,141003,141004,142005,142006,142007,142008,142009,142010,143011,143012,143013,143014,143015,144016",
 	"criMul": 1.5,
 	"heroStar": 7,
-	"food": 100000,
-	"yb": 100000,
+	"food": 10000,
+	"yb": 1000,
 	"redbag": 0,
-	"prestige": 100000,
+	"prestige": 0,
 	"invite_cost": 2000,
 	"invite_discount": 0.9,
 	"invite_wish_quality": "2,3,4",
@@ -30,5 +30,6 @@
 	"turntable_payTime": 8,
 	"turntable_recover": "12,18,24",
 	"dailyDropLimit": 20,
-	"saveLimit": 20
+	"saveLimit": 20,
+	"videofoodtime": 10
 }

+ 4 - 4
tower_sanguo/assets/resources/data/turntable_data.json

@@ -4,7 +4,7 @@
 		"item": 1,
 		"type": 0,
 		"num": 500,
-		"des": "少量粮草",
+		"des": "粮草",
 		"weight": 35,
 		"upRewardInfo": "1,1000;5,1500;9,2000",
 		"icon": 3
@@ -14,7 +14,7 @@
 		"item": 1,
 		"type": 0,
 		"num": 1000,
-		"des": "大量粮草",
+		"des": "粮草",
 		"weight": 20,
 		"upRewardInfo": "3,1500;7,2500",
 		"icon": 4
@@ -24,7 +24,7 @@
 		"item": 2,
 		"type": 0,
 		"num": 300,
-		"des": "少量元宝",
+		"des": "元宝",
 		"weight": 15,
 		"icon": 6
 	},
@@ -51,7 +51,7 @@
 		"item": 2,
 		"type": 0,
 		"num": 1000,
-		"des": "大量元宝",
+		"des": "元宝",
 		"weight": 10,
 		"icon": 7
 	}

File diff ditekan karena terlalu besar
+ 258 - 126
tower_sanguo/assets/resources/module/drawRecruit/drawGeneral.prefab


+ 9 - 486
tower_sanguo/assets/resources/module/drawRecruit/drawRecruit.prefab

@@ -14,7 +14,7 @@
   {
     "__type__": "cc.Node",
     "_name": "drawRecruit",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "_parent": null,
     "_children": [
       {
@@ -52,31 +52,19 @@
       },
       {
         "__id__": 96
-      },
-      {
-        "__id__": 150
-      },
-      {
-        "__id__": 153
-      },
-      {
-        "__id__": 156
-      },
-      {
-        "__id__": 159
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 162
+        "__id__": 150
       },
       {
-        "__id__": 163
+        "__id__": 151
       }
     ],
     "_prefab": {
-      "__id__": 164
+      "__id__": 152
     },
     "_opacity": 255,
     "_color": {
@@ -2708,10 +2696,10 @@
     ],
     "paused": false,
     "defaultSkin": "default",
-    "defaultAnimation": "animation",
+    "defaultAnimation": "",
     "_preCacheMode": 0,
     "_cacheMode": 0,
-    "loop": true,
+    "loop": false,
     "premultipliedAlpha": true,
     "timeScale": 1,
     "_accTime": 0,
@@ -5492,474 +5480,6 @@
     "sync": false
   },
   {
-    "__type__": "cc.Node",
-    "_name": "zise",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 151
-      }
-    ],
-    "_prefab": {
-      "__id__": 152
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 0,
-      "height": 0
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        -209.244,
-        249.843,
-        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__": "sp.Skeleton",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 150
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
-      }
-    ],
-    "paused": false,
-    "defaultSkin": "default",
-    "defaultAnimation": "animation",
-    "_preCacheMode": 0,
-    "_cacheMode": 0,
-    "loop": true,
-    "premultipliedAlpha": true,
-    "timeScale": 1,
-    "_accTime": 0,
-    "_playCount": 0,
-    "_frameCache": null,
-    "_curFrame": null,
-    "_skeletonCache": null,
-    "_animationName": "animation",
-    "_animationQueue": [],
-    "_headAniInfo": null,
-    "_playTimes": 0,
-    "_isAniComplete": true,
-    "_N$skeletonData": {
-      "__uuid__": "628f3d04-87e3-48cf-873d-012bfe451db1"
-    },
-    "_N$_defaultCacheMode": 0,
-    "_N$debugSlots": false,
-    "_N$debugBones": false,
-    "_N$debugMesh": false,
-    "_N$useTint": false,
-    "_N$enableBatch": false,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "bcc41a24-73d7-4017-9758-bec528bf7aa8"
-    },
-    "fileId": "0bSDI9xMdB3r10Md+NMdoC",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "xuneng",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 154
-      }
-    ],
-    "_prefab": {
-      "__id__": 155
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 290.95,
-      "height": 357.67
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        -202.998,
-        -12.492,
-        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__": "sp.Skeleton",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 153
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
-      }
-    ],
-    "paused": false,
-    "defaultSkin": "default",
-    "defaultAnimation": "animation",
-    "_preCacheMode": 0,
-    "_cacheMode": 0,
-    "loop": true,
-    "premultipliedAlpha": true,
-    "timeScale": 1,
-    "_accTime": 0,
-    "_playCount": 0,
-    "_frameCache": null,
-    "_curFrame": null,
-    "_skeletonCache": null,
-    "_animationName": "animation",
-    "_animationQueue": [],
-    "_headAniInfo": null,
-    "_playTimes": 0,
-    "_isAniComplete": true,
-    "_N$skeletonData": {
-      "__uuid__": "97ad66c7-62ce-406a-b644-59892045a49e"
-    },
-    "_N$_defaultCacheMode": 0,
-    "_N$debugSlots": false,
-    "_N$debugBones": false,
-    "_N$debugMesh": false,
-    "_N$useTint": false,
-    "_N$enableBatch": false,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "bcc41a24-73d7-4017-9758-bec528bf7aa8"
-    },
-    "fileId": "1bKziydB1Ljo/An260DQdB",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "boom",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 157
-      }
-    ],
-    "_prefab": {
-      "__id__": 158
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 0,
-      "height": 0
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        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__": "sp.Skeleton",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 156
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
-      }
-    ],
-    "paused": false,
-    "defaultSkin": "default",
-    "defaultAnimation": "animation",
-    "_preCacheMode": 0,
-    "_cacheMode": 0,
-    "loop": true,
-    "premultipliedAlpha": true,
-    "timeScale": 1,
-    "_accTime": 0,
-    "_playCount": 0,
-    "_frameCache": null,
-    "_curFrame": null,
-    "_skeletonCache": null,
-    "_animationName": "animation",
-    "_animationQueue": [],
-    "_headAniInfo": null,
-    "_playTimes": 0,
-    "_isAniComplete": true,
-    "_N$skeletonData": {
-      "__uuid__": "0cd50f9b-1277-478e-b7d2-af81f8090ba0"
-    },
-    "_N$_defaultCacheMode": 0,
-    "_N$debugSlots": false,
-    "_N$debugBones": false,
-    "_N$debugMesh": false,
-    "_N$useTint": false,
-    "_N$enableBatch": false,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "bcc41a24-73d7-4017-9758-bec528bf7aa8"
-    },
-    "fileId": "bctRKcVbBGs64/z3RSPoG0",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "star",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 160
-      }
-    ],
-    "_prefab": {
-      "__id__": 161
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 0,
-      "height": 0
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        249.843,
-        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__": "sp.Skeleton",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 159
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
-      }
-    ],
-    "paused": false,
-    "defaultSkin": "default",
-    "defaultAnimation": "animation",
-    "_preCacheMode": 0,
-    "_cacheMode": 0,
-    "loop": true,
-    "premultipliedAlpha": true,
-    "timeScale": 1,
-    "_accTime": 0,
-    "_playCount": 0,
-    "_frameCache": null,
-    "_curFrame": null,
-    "_skeletonCache": null,
-    "_animationName": "animation",
-    "_animationQueue": [],
-    "_headAniInfo": null,
-    "_playTimes": 0,
-    "_isAniComplete": true,
-    "_N$skeletonData": {
-      "__uuid__": "d9517168-3ecc-4368-9ef6-27a75ca6b928"
-    },
-    "_N$_defaultCacheMode": 0,
-    "_N$debugSlots": false,
-    "_N$debugBones": false,
-    "_N$debugMesh": false,
-    "_N$useTint": false,
-    "_N$enableBatch": false,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "bcc41a24-73d7-4017-9758-bec528bf7aa8"
-    },
-    "fileId": "04udp6LkxA76UTwRZYDjlR",
-    "sync": false
-  },
-  {
     "__type__": "cc.Widget",
     "_name": "",
     "_objFlags": 0,
@@ -6025,6 +5545,9 @@
     "img_wish_camp": {
       "__id__": 92
     },
+    "spine_light": {
+      "__id__": 71
+    },
     "txt_cost_one": {
       "__id__": 109
     },

TEMPAT SAMPAH
tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang_light.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang_light.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "90e934aa-491b-44e7-9acb-cb79fac61153",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 489,
+  "height": 677,
+  "platformSettings": {},
+  "subMetas": {
+    "kapai_guang_light": {
+      "ver": "1.0.4",
+      "uuid": "5f75f8b3-ab42-4524-9805-5a36096e3e42",
+      "rawTextureUuid": "90e934aa-491b-44e7-9acb-cb79fac61153",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 489,
+      "height": 677,
+      "rawWidth": 489,
+      "rawHeight": 677,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

File diff ditekan karena terlalu besar
+ 139 - 161
tower_sanguo/assets/resources/module/fight/fight.prefab


TEMPAT SAMPAH
tower_sanguo/assets/resources/module/fight/prefab_texture/check_point_bg.png


+ 36 - 0
tower_sanguo/assets/resources/module/fight/prefab_texture/check_point_bg.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "cd3bc3c3-a782-41ac-a4eb-f936549514aa",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 750,
+  "height": 128,
+  "platformSettings": {},
+  "subMetas": {
+    "check_point_bg": {
+      "ver": "1.0.4",
+      "uuid": "d20f41e3-8301-4dff-92d6-adda9149537d",
+      "rawTextureUuid": "cd3bc3c3-a782-41ac-a4eb-f936549514aa",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 750,
+      "height": 128,
+      "rawWidth": 750,
+      "rawHeight": 128,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

File diff ditekan karena terlalu besar
+ 0 - 0
tower_sanguo/assets/resources/module/fight/spine/bing_die.json


+ 122 - 110
tower_sanguo/assets/resources/module/getLiangCao/get_liangcao.prefab

@@ -684,13 +684,13 @@
         "__id__": 47
       },
       {
-        "__id__": 49
+        "__id__": 61
       },
       {
-        "__id__": 63
+        "__id__": 65
       },
       {
-        "__id__": 67
+        "__id__": 69
       }
     ],
     "_active": true,
@@ -1544,7 +1544,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "lbl_lc_count",
+    "_name": "lbl_lc_times",
     "_objFlags": 0,
     "_parent": {
       "__id__": 35
@@ -1805,77 +1805,6 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "New Node",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 16
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [],
-    "_prefab": {
-      "__id__": 48
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 600,
-      "height": 350
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        -144.081,
-        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.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "94ac848f-6478-4b7f-8c5e-66aa9f6c3147"
-    },
-    "fileId": "987b1FCrJGpbljTWKWQ6sw",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
     "_name": "btn_get_lv",
     "_objFlags": 0,
     "_parent": {
@@ -1883,20 +1812,20 @@
     },
     "_children": [
       {
-        "__id__": 50
+        "__id__": 48
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 60
+        "__id__": 58
       },
       {
-        "__id__": 61
+        "__id__": 59
       }
     ],
     "_prefab": {
-      "__id__": 62
+      "__id__": 60
     },
     "_opacity": 255,
     "_color": {
@@ -1950,24 +1879,24 @@
     "_name": "Layout",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 49
+      "__id__": 47
     },
     "_children": [
       {
-        "__id__": 51
+        "__id__": 49
       },
       {
-        "__id__": 54
+        "__id__": 52
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 58
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 59
+      "__id__": 57
     },
     "_opacity": 255,
     "_color": {
@@ -2021,17 +1950,17 @@
     "_name": "node_tv",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 50
+      "__id__": 48
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 52
+        "__id__": 50
       }
     ],
     "_prefab": {
-      "__id__": 53
+      "__id__": 51
     },
     "_opacity": 255,
     "_color": {
@@ -2085,7 +2014,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 51
+      "__id__": 49
     },
     "_enabled": true,
     "_materials": [
@@ -2128,20 +2057,20 @@
     "_name": "lbl_btn_desc",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 50
+      "__id__": 48
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 55
+        "__id__": 53
       },
       {
-        "__id__": 56
+        "__id__": 54
       }
     ],
     "_prefab": {
-      "__id__": 57
+      "__id__": 55
     },
     "_opacity": 255,
     "_color": {
@@ -2195,7 +2124,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 54
+      "__id__": 52
     },
     "_enabled": true,
     "_materials": [
@@ -2204,8 +2133,8 @@
       }
     ],
     "_useOriginalSize": false,
-    "_string": "双倍领取",
-    "_N$string": "双倍领取",
+    "_string": "领取粮草",
+    "_N$string": "领取粮草",
     "_fontSize": 44,
     "_lineHeight": 40,
     "_enableWrapText": true,
@@ -2229,7 +2158,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 54
+      "__id__": 52
     },
     "_enabled": true,
     "_color": {
@@ -2258,7 +2187,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 50
+      "__id__": 48
     },
     "_enabled": true,
     "_layoutSize": {
@@ -2301,7 +2230,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 49
+      "__id__": 47
     },
     "_enabled": true,
     "_materials": [
@@ -2333,7 +2262,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 49
+      "__id__": 47
     },
     "_enabled": true,
     "_normalMaterial": {
@@ -2420,14 +2349,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 64
+        "__id__": 62
       },
       {
-        "__id__": 65
+        "__id__": 63
       }
     ],
     "_prefab": {
-      "__id__": 66
+      "__id__": 64
     },
     "_opacity": 255,
     "_color": {
@@ -2481,7 +2410,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 63
+      "__id__": 61
     },
     "_enabled": true,
     "_materials": [
@@ -2515,7 +2444,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 63
+      "__id__": 61
     },
     "_enabled": true,
     "_color": {
@@ -2541,7 +2470,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "lbl_desc",
+    "_name": "lbl_rest_times",
     "_objFlags": 0,
     "_parent": {
       "__id__": 16
@@ -2550,14 +2479,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 68
+        "__id__": 66
       },
       {
-        "__id__": 69
+        "__id__": 67
       }
     ],
     "_prefab": {
-      "__id__": 70
+      "__id__": 68
     },
     "_opacity": 255,
     "_color": {
@@ -2611,7 +2540,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 67
+      "__id__": 65
     },
     "_enabled": true,
     "_materials": [
@@ -2645,7 +2574,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 67
+      "__id__": 65
     },
     "_enabled": true,
     "_color": {
@@ -2670,6 +2599,77 @@
     "sync": false
   },
   {
+    "__type__": "cc.Node",
+    "_name": "node_video",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 16
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 70
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 600,
+      "height": 350
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -160.295,
+        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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "94ac848f-6478-4b7f-8c5e-66aa9f6c3147"
+    },
+    "fileId": "987b1FCrJGpbljTWKWQ6sw",
+    "sync": false
+  },
+  {
     "__type__": "cc.Widget",
     "_name": "",
     "_objFlags": 0,
@@ -2978,6 +2978,18 @@
     "open_effect": 1,
     "close_effect": 1,
     "close_toPoint": "",
+    "btn_receive": {
+      "__id__": 59
+    },
+    "lbl_can_up": {
+      "__id__": 40
+    },
+    "lbl_rest_times": {
+      "__id__": 66
+    },
+    "lbl_lc_count": {
+      "__id__": 30
+    },
     "_id": ""
   },
   {

File diff ditekan karena terlalu besar
+ 160 - 636
tower_sanguo/assets/scenes/Test_Znh.fire


+ 0 - 4
tower_sanguo/assets/scripts/GameController.ts

@@ -49,10 +49,6 @@ class GameController {
     init() {
         this.initErrorHandler();
 
-        if (this.useLocalServer) {
-            this.servertest = new ServerManager();
-        }
-
         this.resM = new ResManager();
         this.errorM = new ErrorManager();
         this.uiM = new UIManager();

+ 5 - 2
tower_sanguo/assets/scripts/data/GameData.ts

@@ -11,6 +11,7 @@ import GeneralProp from "../net/msg/GeneralProp";
 import PlayerProp from "../net/msg/PlayerProp";
 import PlayerResponse from "../net/msg/PlayerResponse";
 import PlayerUpdateResponse from "../net/msg/PlayerUpdateResponse";
+import ServerManager from "../net/servertest/ServerManager";
 import { Dictionary } from "../utils/Dictionary";
 import BarrackVO from "../vo/BarrackVO";
 import BuffVO from "../vo/BuffVO";
@@ -73,7 +74,7 @@ export default class GameData {
         'star', 'help', 'turntable', 'taskActive', 'task', 'commanderskill', 'openfun'];
 
     /** 是否使用本地资源,不使用oss资源 */
-    private useLocal: boolean = true;
+    private useLocal: boolean = false;
 
     async initLocalConfigs() {
         console.log('initLocalConfigs');
@@ -121,9 +122,10 @@ export default class GameData {
     }
 
     private initJsonData() {
+        GameController.useLocalServer = this.db_data.playerInfo.useserver != 1;
         LogUtil.logAndroid('initJsonData...' + GameController.useLocalServer);
         if (GameController.useLocalServer) {
-            GameController.servertest.init();
+            GameController.servertest = new ServerManager();
         }
 
         this.fullskillId = [];
@@ -195,6 +197,7 @@ export default class GameData {
             vo.cd = o.cd;
             vo.foodRecover = o.recover;
             vo.foodMax = o.maxCapacity;
+            vo.videofood = o.videofood;
             vo.initRounds(o.monsterData);
             this.mission_data[i] = vo;
         }

+ 2 - 0
tower_sanguo/assets/scripts/data/GameDefinition.ts

@@ -57,6 +57,8 @@ export enum PLAYERPROP {
 
     /**剩余红包兑换元宝次数*/
     USER_EXCHANGE_TIMES = 34,
+    /** 领取粮草模块数据 */
+    GET_FOOD_DATA = 35,
 }
 
 export enum ITEMTYPE {

+ 2 - 0
tower_sanguo/assets/scripts/manager/XXConst.ts

@@ -12,6 +12,8 @@ export class XXConst {
     public EventGetReward = 'event-get-reward';
     /** 是新的一天 */
     public EventIsNewDay = 'event-is-new-day';
+    /** 新的一波开始了 */
+    public EventNewMissionStart = 'event-new-mission-start';
 };
 declare global {
     const XXConst: XXConst;

+ 1 - 1
tower_sanguo/assets/scripts/module/checkpointRedBag/CheckpointRedBagBtn.ts

@@ -23,7 +23,7 @@ export default class CheckpointRedBagBtn extends cc.Component {
         XXEvent.addClickEvent(this.btn_chPo_RedBag, this.onClickChPoRedBag, this);
         XXEvent.on('event-get-checkpoint-redbag', this.onAddRedBag, this);
         XXEvent.on('event-monster-died', this.onMonsterDied, this);
-        XXEvent.on('event-new-mission-start', this.onNewMissionStart, this)// 新的一波开始了
+        XXEvent.on(XXConst.EventNewMissionStart, this.onNewMissionStart, this)// 新的一波开始了
     }
 
     start() {

+ 1 - 1
tower_sanguo/assets/scripts/module/checkpointRedBag/CheckpointRedBagItem.ts

@@ -23,7 +23,7 @@ export default class CheckpointRedBagItem extends cc.Component {
     /** 主页组件 */
     private comp_main: MainUI = null!;
     onLoad() {
-        XXEvent.on('event-new-mission-start', this.onNewMissionStart, this)// 新的一波开始了
+        XXEvent.on(XXConst.EventNewMissionStart, this.onNewMissionStart, this)// 新的一波开始了
         this.comp_btn = this.node.getComponent(cc.Button);
         XXEvent.addClickEvent(this.comp_btn, this.flyNode, this);
         // this.scheduleOnce(this.flyNode, this.life_time);

+ 38 - 0
tower_sanguo/assets/scripts/module/drawRecruit/DrawGeneralUI.ts

@@ -59,6 +59,8 @@ export default class DrawGeneralUI extends BaseUI {
     isOpenAll: boolean = false;
 
     isCanClick: boolean = true;     //暂时没用
+    //测试翻牌动画
+    private isTestAni = true;
 
     onLoad() {
         GameController.gameData.player.addComponent(this, PLAYERPROP.YB);
@@ -131,6 +133,7 @@ export default class DrawGeneralUI extends BaseUI {
     async openDraw_Ten() {
         this.isCanClick = false;
         let draw_data = this.ui_data.draw_data;
+        await Time.WaitForSeconds(0.5);
         for (let i = 0; cc.isValid(this) && i < this.drawItem_tens.length; i++) {
             if (!this.isOpenAll) {
                 let general = GameController.gameData.getGeneralByID(draw_data[i].id);// DrawRecruitModel.Ins.getAGeneral();
@@ -163,6 +166,18 @@ export default class DrawGeneralUI extends BaseUI {
 
     click_Draw_OneBtn() {
         this.drawItem_one.init();
+
+        //TEST
+        if(this.isTestAni){
+            let tempData = [
+                { id: 113009, type: 11, num: 1 }
+            ];
+            DrawRecruitModel.Ins.addDrawResultData(tempData);
+            this.ui_data = { type: 1, draw_data: tempData };
+            this.initPanelOne();
+            return;
+        }
+
         if (DrawRecruitModel.Ins.isCanDrawGeneral(1)) {
             GameController.http.drawCard((data) => {
                 console.log("--Data DrawCard UI 1: ", data);
@@ -203,6 +218,29 @@ export default class DrawGeneralUI extends BaseUI {
         for (let t of this.drawItem_tens) {
             t.init();
         }
+
+        //TEST
+        if(this.isTestAni){
+            let tempData = [
+                { id: 111004, type: 11, num: 1 },
+                { id: 111003, type: 11, num: 1 },
+                { id: 112005, type: 11, num: 1 },
+                { id: 112006, type: 11, num: 1 },
+                { id: 112007, type: 11, num: 1 },
+                { id: 112008, type: 11, num: 1 },
+                { id: 113009, type: 11, num: 1 },
+                { id: 113010, type: 11, num: 1 },
+                { id: 113011, type: 11, num: 1 },
+                { id: 113012, type: 11, num: 1 }
+            ];
+            DrawRecruitModel.Ins.addDrawResultData(tempData);
+            this.ui_data = { type: 2, draw_data: tempData };
+            this.openDraw_Ten();
+            this.panelTen_start.active = true;
+            this.panelTen_end.active = false;
+            return;
+        }
+
         if (DrawRecruitModel.Ins.isCanDrawGeneral(2)) {
             GameController.http.drawCard((data) => {
                 console.log("--Data DrawCard UI 10: ", data);

+ 59 - 29
tower_sanguo/assets/scripts/module/drawRecruit/DrawItem.ts

@@ -1,4 +1,5 @@
 import Time from "../../../MOKA/util/Time";
+import { Utils } from "../../../MOKA/util/Utils";
 import GeneralVO from "../../vo/GeneralVO";
 
 const { ccclass, property } = cc._decorator;
@@ -17,6 +18,8 @@ export default class DrawItem extends cc.Component {
 
     @property({ type: cc.Sprite, displayName: "图_背光" })
     img_light: cc.Sprite = null;
+    @property({ type: cc.Sprite, displayName: "图_背光开_先显示" })
+    img_light_before: cc.Sprite = null;
     @property({ type: cc.Sprite, displayName: "图_背光开" })
     img_light_opened: cc.Sprite = null;
 
@@ -54,9 +57,11 @@ export default class DrawItem extends cc.Component {
     @property({ type: sp.Skeleton, displayName: "动画_高品质3" })
     spine_best3: sp.Skeleton = null;
 
+    private initPos: cc.Vec2 = cc.v2();
     isOpened = false;
 
     onLoad() {
+        this.initPos = this.node.getPosition();
         this.init();
     }
 
@@ -64,11 +69,13 @@ export default class DrawItem extends cc.Component {
         this.isOpened = false;
         cc.Tween.stopAllByTarget(this.btn_open);
         cc.Tween.stopAllByTarget(this.node_opened);
+        this.node.setPosition(this.initPos);
         this.btn_open.scaleX = 1;
         this.node_opened.scaleX = 0;
         this.node_opened.active = false;
         this.img_camp.node.active = false;
         this.node_hasHero.active = false;
+        this.img_light_before.node.active = false;
 
         this.spine_zi.node.active = false;
         this.spine_best1.node.active = false;
@@ -95,12 +102,12 @@ export default class DrawItem extends cc.Component {
 
             if (general.color == 1) {
                 cc.tween(this.btn_open)
-                    .to(0.2, { scaleX: 0 })
+                    .to(0.25, { scaleX: 0 })
                     .call(() => {
                         this.node_opened.active = true;
 
                         cc.tween(this.node_opened)
-                            .to(0.2, { scaleX: 1 })
+                            .to(0.25, { scaleX: 1 })
                             .call(() => {
                                 this.img_camp.node.active = true;
 
@@ -166,16 +173,14 @@ export default class DrawItem extends cc.Component {
     */
     async playAni(type: number, isSlice: boolean, num: number) {
         if (type == 1) {
-            this.spine_zi.node.active = true;
-            this.spine_zi.setAnimation(0, "animation", false);
 
             cc.tween(this.btn_open)
-                .to(0.2, { scaleX: 0 })
+                .to(0.25, { scaleX: 0 })
                 .call(() => {
                     this.node_opened.active = true;
 
                     cc.tween(this.node_opened)
-                        .to(0.2, { scaleX: 1 })
+                        .to(0.25, { scaleX: 1 })
                         .call(() => {
                             this.img_camp.node.active = true;
 
@@ -184,47 +189,72 @@ export default class DrawItem extends cc.Component {
                             this.txt_slice.string = "x" + num;
                         })
                         .start();
+                    this.playZiAni();
                 })
                 .start();
 
-            await Time.WaitForSeconds(this.spine_zi.findAnimation("animation").duration + 0.1);
-            if (cc.isValid(this.node)) {
-                this.spine_zi.node.active = false;
-            }
+
         } else {
-            this.spine_best1.node.active = true;
-            this.spine_best1.setAnimation(0, "animation", true);
-            await Time.WaitForSeconds(this.spine_best1.findAnimation("animation").duration + 1);
-            this.spine_best1.node.active = false;
-            this.spine_best2.node.active = true;
-            this.spine_best2.setAnimation(0, "animation", false);
+            this.img_light.node.active = false;
+            this.img_light_before.node.active = true;
 
-            cc.tween(this.btn_open)
-                .to(0.2, { scaleX: 0 })
+            cc.tween(this.node)
+                .to(0.4, { position: cc.v2(this.node.x, this.node.y + 30) })
                 .call(() => {
-                    this.node_opened.active = true;
+                    this.playBest1Ani();
+                    Utils.ScreenShock(this.node, 1.5, () => {
+                        if (!cc.isValid(this.node)) return;
+                        this.spine_best1.node.active = false;
+                        this.spine_best2.node.active = true;
+                        this.spine_best2.setAnimation(0, "animation", false);
+
+                        cc.tween(this.btn_open)
+                            .to(0.25, { scaleX: 0 })
+                            .call(() => {
+                                this.node_opened.active = true;
 
-                    cc.tween(this.node_opened)
-                        .to(0.2, { scaleX: 1 })
-                        .call(() => {
-                            this.img_camp.node.active = true;
+                                cc.tween(this.node_opened)
+                                    .to(0.25, { scaleX: 1 })
+                                    .call(() => {
+                                        this.img_camp.node.active = true;
 
-                            //碎片判断 是否已拥有该武将
-                            this.node_hasHero.active = isSlice;
-                            this.txt_slice.string = "x" + num;
+                                        //碎片判断 是否已拥有该武将
+                                        this.node_hasHero.active = isSlice;
+                                        this.txt_slice.string = "x" + num;
 
-                            this.playAniCard();
-                        })
-                        .start();
+                                        this.playAniCard();
+                                    })
+                                    .start();
+                            })
+                            .start();
+                    });
                 })
                 .start();
+
+
         }
     }
 
+    async playZiAni() {
+        this.spine_zi.node.active = true;
+        this.spine_zi.setAnimation(0, "animation", false);
+        await Time.WaitForSeconds(this.spine_zi.findAnimation("animation").duration + 0.1);
+        if (cc.isValid(this.node)) {
+            this.spine_zi.node.active = false;
+        }
+    }
+
+    async playBest1Ani() {
+        this.spine_best1.node.active = true;
+        this.spine_best1.setAnimation(0, "animation", true);
+        await Time.WaitForSeconds(this.spine_best1.findAnimation("animation").duration + 1);
+    }
+
     async playAniCard() {
         this.spine_best3.node.active = true;
         this.spine_best3.setAnimation(0, "animation", false);
         await Time.WaitForSeconds(this.spine_best3.findAnimation("animation").duration + 0.1);
+        if (!cc.isValid(this.node)) return;
         this.spine_best3.node.active = false;
     }
 }

+ 39 - 0
tower_sanguo/assets/scripts/module/drawRecruit/DrawRecruitUI.ts

@@ -36,6 +36,9 @@ export default class DrawRecruitUI extends BaseUI {
     @property({ type: cc.Sprite, displayName: '图_心愿武将阵营' })
     img_wish_camp: cc.Sprite = null;
 
+    @property({ type: sp.Skeleton, displayName: 'Spine_光条特效动画' })
+    spine_light: sp.Skeleton = null;
+
     @property({ type: cc.Label, displayName: '文本_单抽消耗' })
     txt_cost_one: cc.Label = null;
 
@@ -45,6 +48,10 @@ export default class DrawRecruitUI extends BaseUI {
     @property({ type: cc.Label, displayName: '文本_十连抽原价消耗' })
     txt_cost_ten_old: cc.Label = null;
 
+
+    //测试翻牌动画
+    private isTestAni = true;
+
     onLoad() {
         XXEvent.on("updateWishInfo", this.updateWishInfo, this);
 
@@ -88,6 +95,7 @@ export default class DrawRecruitUI extends BaseUI {
                 if (errr) { return; }
                 this.img_wish_camp.spriteFrame = asset;
             });
+            this.spine_light.setAnimation(0, "animation", false);
         }
         else {
             this.img_wish.spriteFrame = null;
@@ -111,6 +119,16 @@ export default class DrawRecruitUI extends BaseUI {
         //if (GameController.gameData.player.generals_bag != null)
         //    GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 1 });
 
+        //TEST
+        if(this.isTestAni){
+            let tempData = [
+                { id: 113009, type: 11, num: 1 }
+            ];
+            DrawRecruitModel.Ins.addDrawResultData(tempData);
+            GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 1, draw_data: tempData });
+            return;
+        }
+
         if (DrawRecruitModel.Ins.isCanDrawGeneral(1)) {
             GameController.http.drawCard((data) => {
                 console.log("--Data DrawCard 1: ", data);
@@ -141,6 +159,27 @@ export default class DrawRecruitUI extends BaseUI {
 
     click_DrawTenBtn() {
         GameController.audioM.playEffect(AUDIO_TYPE.button);
+
+        //TEST
+        if(this.isTestAni){
+            let tempData = [
+                { id: 111004, type: 11, num: 1 },
+                { id: 111003, type: 11, num: 1 },
+                { id: 112005, type: 11, num: 1 },
+                { id: 112006, type: 11, num: 1 },
+                { id: 112007, type: 11, num: 1 },
+                { id: 112008, type: 11, num: 1 },
+                { id: 113009, type: 11, num: 1 },
+                { id: 113010, type: 11, num: 1 },
+                { id: 113011, type: 11, num: 1 },
+                { id: 113012, type: 11, num: 1 }
+            ];
+    
+            DrawRecruitModel.Ins.addDrawResultData(tempData);
+            GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 2, draw_data: tempData });
+            return;
+        }
+
         //if (GameController.gameData.player.generals_bag != null)
         //    GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 2 });
         if (DrawRecruitModel.Ins.isCanDrawGeneral(2)) {

+ 9 - 0
tower_sanguo/assets/scripts/module/drawRecruit/DrawResultUI.ts

@@ -27,6 +27,9 @@ export default class DrawResultUI extends BaseUI {
                 this.scrollView.enabled = false;
                 this.content.setPosition(cc.v2(0, 0));
                 console.log("-----");
+            } else {
+                let posx = (data.length * 110 + (data.length - 1) * 30) / 2 - 253;
+                this.content.setPosition(cc.v2(posx, 0));
             }
             for (let i = 0; i < data.length; i++) {
                 let scr = cc.instantiate(this.drawResultItem.node).getComponent(DrawResultItem);
@@ -42,4 +45,10 @@ export default class DrawResultUI extends BaseUI {
     onDestroy() {
         DrawRecruitModel.Ins.drawResults = null;
     }
+    /*
+    总半长:685
+    框宽:506
+    targetposx:685-253=432  总半长>框宽
+    150-253=-103
+    */
 }

+ 7 - 5
tower_sanguo/assets/scripts/module/fight/FightUI.ts

@@ -491,12 +491,12 @@ export default class FightUI extends BaseUI {
         //更新主界面的关卡组件
         GameController.mainui.updateMission();
         // cc.tween(this.mission_start).to(0.5, { x: 0 }).delay(0.8).to(0.3, { x: -750 }).call(this.checkGeneralBuff.bind(this)).start();
-        GameUtil.shake(this.lbl_mission.node.parent, 20, 2)// 此处Bug:后面的抖动无效
+        // GameUtil.shake(this.lbl_mission.node.parent, 20, 2)// 此处Bug:后面的抖动无效
         // GameUtil.shake(this.lbl_mission.node.parent.getChildByName('lbl_di'), 20, 2)
         // GameUtil.shake(this.lbl_mission.node.parent.getChildByName('lbl_guan'), 20, 2)
         this.mission_start.stop();
         this.mission_start.play();
-        XXEvent.emit('event-new-mission-start')// 新的一波开始了
+        XXEvent.emit(XXConst.EventNewMissionStart, mission)// 新的一波开始了
     }
     private playMissionEndEffect(win: boolean, rewards: string) {
         if (win) {
@@ -1205,9 +1205,11 @@ export default class FightUI extends BaseUI {
     }
     /** 关闭武将界面时,检查武将羁绊变更,有则展示羁特效 */
     private onCheckFetterChange() {
-        this.clearFetter();
-        this.checkFetterSkill();
-        this.createFetter(true);
+        if (GeneralUIModel.is_change_embattle) {
+            this.clearFetter();
+            this.checkFetterSkill();
+            this.createFetter(true);
+        }
 
     }
 }

+ 63 - 6
tower_sanguo/assets/scripts/module/getLiangCao/GetLiangCaoModel.ts

@@ -1,11 +1,68 @@
+import { PLAYERPROP } from "../../data/GameDefinition";
+import GameController from "../../GameController";
+
 /**
  *  获取粮草界面逻辑
  */
 export default class GetLiangCaoModel {
-    /** 当前粮草值 */
-    public static cur_lc_value: number = 0;
-    /** 需要的粮草值 */
-    public static need_lc_value: number = 1;
-    /** x秒后可训练 */
-    public static need_after_time: number = 0;
+    /** 粮草界面数据 */
+    public static model_data = {
+        /** 今日剩余视频次数 
+         * - 跨天重置
+        */
+        rest_vedio_times: 0,
+        /** 可以获得的粮草数量 */
+        food_count: 4999,
+    }
+    /** 今日最多可看视频次数 
+     * - 走配置,需要配置
+    */
+    public static max_vedio_times: number = 40;
+    /** 保存数据 */
+    public static saveData() {
+        let temp_str_model_data = JSON.stringify(this.model_data);
+        GameController.gameData.updatePropNoCheck(PLAYERPROP.GET_FOOD_DATA, temp_str_model_data);// 任务条数据
+    }
+    /** 重置数据 */
+    public static resetData() {
+        this.model_data.rest_vedio_times = this.max_vedio_times;
+        this.saveData();
+    }
+    /** 更新可以获得的粮草数量 
+     * 每关刷新
+    */
+    public static updateFoodCount(mission_id) {
+        this.model_data.food_count = GameController.gameData.getMissionByID(mission_id).videofood;
+    }
+    /** 预计可训练次数 
+     * - 实时计算得到
+     * - 向下取整
+     * - 次数 = 数量 / 每次消耗
+    */
+    public static canExpUpTimes(): number {
+        let can_expUp_times = 0;
+
+        let cur_food = this.model_data.food_count;
+        let consume_food = GameController.gameData.player.getProp(PLAYERPROP.FOODCONSUME);
+        can_expUp_times = Math.floor(cur_food / consume_food);
+        return can_expUp_times;
+    }
+    /** 预计多少秒后可训练
+     * - 实时计算得到
+     * - 向上取整
+     * - 时间 = 缺少的粮草数量 / 每秒获得
+     */
+    public static needAfterTime() {
+        let need_after_time = 0;
+        // 粮草每秒获得数量
+        let food_recover = GameController.gameData.player.getProp(PLAYERPROP.FOODRECOVER);
+        // 下级消耗
+        let consume_food = GameController.gameData.player.getProp(PLAYERPROP.FOODCONSUME);
+        // 当前粮草数量
+        let cur_food = GameController.gameData.player.getProp(PLAYERPROP.FOOD);
+        // 缺少的粮草数量
+        let need_food = consume_food - cur_food;
+        need_after_time = Math.ceil(need_food / food_recover);
+        return need_after_time;
+    }
 }

+ 28 - 6
tower_sanguo/assets/scripts/module/getLiangCao/GetLiangCaoUI.ts

@@ -1,6 +1,7 @@
 
 import BaseUI from "../../../MOKA/component/BaseUI";
-const {ccclass, property} = cc._decorator;
+import GetLiangCaoModel from "./GetLiangCaoModel";
+const { ccclass, property } = cc._decorator;
 
 @ccclass
 export default class GetLiangCaoUI extends BaseUI {
@@ -8,13 +9,34 @@ export default class GetLiangCaoUI extends BaseUI {
     protected static prefabUrl = "module/getLiangCao/get_liangcao";
     protected static className = "GetLiangCaoUI";
 
-    onLoad () {
-
+    @property({ type: cc.Button, displayName: '领取按钮' })
+    private btn_receive: cc.Button = null!;
+    @property({ type: cc.Label, displayName: '预计训练次数' })
+    private lbl_can_up: cc.Label = null!;
+    @property({ type: cc.Label, displayName: '今日剩余次数' })
+    private lbl_rest_times: cc.Label = null!;
+    @property({ type: cc.Label, displayName: '粮草数量' })
+    private lbl_lc_count: cc.Label = null!;
+
+    onLoad() {
+        XXEvent.addClickEvent(this.btn_receive, this.onClickReceive, this);
+        XXEvent.on(XXConst.EventNewMissionStart, this.onUpdateFoodCount, this);
     }
 
-    start () {
-
+    start() {
+        this.initStyle();
+    }
+    private initStyle() {
+        this.lbl_can_up.string = GetLiangCaoModel.canExpUpTimes() + '';
+        this.lbl_rest_times.string = GetLiangCaoModel.model_data.rest_vedio_times + '次';
+        this.lbl_lc_count.string = 'x' + GetLiangCaoModel.model_data.food_count;
+    }
+    private onClickReceive() {
+        // 领取粮草逻辑
+        // this.close();
+    }
+    private onUpdateFoodCount(mission_id) {
+        GetLiangCaoModel.updateFoodCount(mission_id);
     }
-
     // update (dt) {}
 }

+ 30 - 8
tower_sanguo/assets/scripts/module/main/MainUI.ts

@@ -158,7 +158,7 @@ export default class MainUI extends BaseUI {
         this.initScheduler();
 
         this.updateOpenUI();
-        this.LcLackUI();
+        this.lcLackUI();
 
         XXEvent.on("MainUIUpdateQiPaoMarshal", this.updateQiPaoMarshal, this);
         XXEvent.on("open-guide", this.openGuideUI, this);
@@ -176,6 +176,8 @@ export default class MainUI extends BaseUI {
                 let vo: MissionVO = GameController.gameData.getMissionByID(GameController.gameData.player.current_mission);
                 GameController.gameData.updateProp(PLAYERPROP.FOOD, Math.floor(vo.foodRecover * 5), true);
             }
+            // 每秒更新
+            this.showBtnExpUpOrLcBtn();
         }, 1);
     }
 
@@ -186,7 +188,7 @@ export default class MainUI extends BaseUI {
         });
     }
     private checkOpenUI(data: FunData) {
-
+        this[data.btn_src].node.active = GameController.gameData.player.max_mission >= data.openmission;
     }
 
     updateProp(type: PLAYERPROP, value: number) {
@@ -197,6 +199,7 @@ export default class MainUI extends BaseUI {
             case PLAYERPROP.FOOD:
                 this.lbl_foodAll.string = value + "";
                 this.task_red.active = TaskModel.checkMainRed();
+                this.showBtnExpUpOrLcBtn();
                 break;
             case PLAYERPROP.REDBAG:
                 this.lbl_redbag.string = value + "";
@@ -204,6 +207,7 @@ export default class MainUI extends BaseUI {
                 break;
             case PLAYERPROP.FOODRECOVER:
                 this.lbl_foodAdd.string = value + "/s";
+                this.showBtnExpUpOrLcBtn();
                 break;
             case PLAYERPROP.FOODCONSUME:
                 this.lbl_food.string = value + "";
@@ -294,11 +298,11 @@ export default class MainUI extends BaseUI {
     }
 
     clickCashOut() {
-
+        
     }
 
     clickAddFood() {
-
+        
     }
 
     clickOpenCommanderUI() {
@@ -411,11 +415,28 @@ export default class MainUI extends BaseUI {
         GameController.uiM.openUI(GuideUI, null, ViewZorder.UI, null, null, g_data);
     }
     /** 训练按钮 - 粮草不足时的ui显示 */
-    private LcLackUI() {
-        let fillRange = GetLiangCaoModel.cur_lc_value / GetLiangCaoModel.need_lc_value;
+    private lcLackUI() {
+        let cur_food = GameController.gameData.player.getProp(PLAYERPROP.FOOD);
+        let need_food = GameController.gameData.player.getProp(PLAYERPROP.FOODCONSUME);
+        let fillRange = cur_food / need_food;
         this.lc_img_bar.fillRange = fillRange;
-        this.lbl_bar_desc.string = `${fillRange * 100}` + '%'
-        this.lbl_time.string = GetLiangCaoModel.need_after_time + 's';
+        this.lbl_bar_desc.string = `${fillRange * 100}` + '%';
+        this.lbl_time.string = GetLiangCaoModel.needAfterTime() + 's';
+    }
+    /** 检查粮草数量,显示训练按钮 or 粮草按钮 */
+    private showBtnExpUpOrLcBtn() {
+        let cur_food = GameController.gameData.player.getProp(PLAYERPROP.FOOD);
+        let need_food = GameController.gameData.player.getProp(PLAYERPROP.FOODCONSUME);
+        if (cur_food >= need_food) {
+            // 满足下一次训练
+            this.btn3.node.active = true;
+            this.btn3_1.node.active = false;
+        } else {
+            // 不满足下次训练,显示粮草按钮
+            this.btn3.node.active = false;
+            this.btn3_1.node.active = true;
+            this.lcLackUI();
+        }
     }
     /** 新的一天 
      * - 检测到当前是新的一天,刷新数据
@@ -424,6 +445,7 @@ export default class MainUI extends BaseUI {
         // 任务数据刷新
         TaskModel.resetTaskData();
         CheckpointRedBagModle.resetTaskData();
+        GetLiangCaoModel.resetData();
     }
 
     onDestroy() {

+ 57 - 0
tower_sanguo/assets/scripts/net/HttpCommand.ts

@@ -341,8 +341,61 @@ export default class HttpCommand {
         msg.num = num;
         let str = JSON.stringify(msg);
         this.httpM.sendRequest(HTTPTYPE.addItem, 'POST', str, callback);
+        // let data = {
+
+        // };
+        // this.sendData(HTTPTYPE.addItem,data,callback);
+    }
+
+    /**
+     * 提取存钱罐
+     */
+     getPiggyBox() {
+        let data = {
+
+        };
+        this.sendData(HTTPTYPE.getPiggyBox, data, (data) => {
+            XXEvent.emit(HTTPTYPE.getPiggyBox,data)
+        });
+    }
+
+    /**
+     * 存钱罐进账
+     */
+     savePiggyBox() {
+        let data = {
+
+        };
+        this.sendData(HTTPTYPE.savePiggyBox, data, (data) => {
+            XXEvent.emit(HTTPTYPE.savePiggyBox,data)
+        });
     }
 
+    /**
+     * 领取通关红包
+     */
+     getStageReward() {
+        let data = {
+
+        };
+        this.sendData(HTTPTYPE.getStageReward, data, (data) => {
+            XXEvent.emit(HTTPTYPE.getStageReward,data)
+        });
+    }
+
+    /**
+     * 掉落通关红包
+     */
+     saveStageReward() {
+        let data = {
+
+        };
+        this.sendData(HTTPTYPE.saveStageReward, data, (data) => {
+            XXEvent.emit(HTTPTYPE.saveStageReward,data)
+        });
+    }
+
+
     //--------------------------ZNH------------------------
 
     /** 武将许愿
@@ -487,6 +540,10 @@ export enum HTTPTYPE {
     reduceTimeInvestProject = 'invest/reduceTimeInvestProject',
 
     updateADLog = 'updateADLog',
+    getPiggyBox = 'piggyBox/getPiggyBox',//提取存钱罐
+    savePiggyBox = 'piggyBox/savePiggyBox',//存钱罐进账
+    getStageReward = 'stage/getStageReward',//领取通关红包
+    saveStageReward = 'stage/saveStageReward',//掉落通关红包
     //-------ZNH
     /** 武将许愿*/
     prayGeneral = 'general/prayGeneral',

+ 1 - 1
tower_sanguo/assets/scripts/net/servertest/ServerManager.ts

@@ -24,7 +24,7 @@ import TaskResponse from "../msg/TaskResponse";
 
 export default class ServerManager {
     constructor() {
-
+        this.init();
     }
 
     init() {

+ 2 - 0
tower_sanguo/assets/scripts/vo/MissionVO.ts

@@ -17,6 +17,8 @@ export default class MissionVO {
     foodMax:number;
 
     rounds:RoundVO[];
+    /** 当前关卡看视频可获得的粮草 */
+    videofood: number;
 
 
     //怪物id:移速(px),怪物数量,刷新间隔(s);......

+ 2 - 2
tower_sanguo/assets/scripts/vo/PlayerVO.ts

@@ -111,8 +111,8 @@ export default class PlayerVO {
     task_list_data: Array<TASKITEM> = [];
     /** 玩家属性值是对象而非数字,解析服务端数据不转num的集合 */
     isObjByPLAYERPROP(id): boolean {
-        let arr = [PLAYERPROP.USER_DAILY_TASK_INFO, PLAYERPROP.USER_DAILY_ACTIVE_INFO, PLAYERPROP.CHECKPOINT_REGBAG_DATA];
-        let bool =  arr.includes(id);
+        let arr = [PLAYERPROP.USER_DAILY_TASK_INFO, PLAYERPROP.USER_DAILY_ACTIVE_INFO, PLAYERPROP.CHECKPOINT_REGBAG_DATA, PLAYERPROP.GET_FOOD_DATA];
+        let bool = arr.includes(id);
         return bool;
     }
 

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini