2 次代碼提交 39696717cb ... 26df088646

作者 SHA1 備註 提交日期
  txq 26df088646 Merge branch 'master' of http://118.178.135.110:3000/fish/tower_client 6 月之前
  txq 68c768b550 修改动画上库 6 月之前

+ 9 - 9
assets/package/prefab/ui/tower/hero/role101.prefab

@@ -111,8 +111,8 @@
     },
     "_lscale": {
       "__type__": "cc.Vec3",
-      "x": 0.5,
-      "y": 0.5,
+      "x": 0.4,
+      "y": 0.4,
       "z": 1
     },
     "_mobility": 0,
@@ -139,13 +139,13 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 191.5,
-      "height": 238
+      "width": 431.95001220703125,
+      "height": 597.7100219726562
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
+      "x": 0.5119110750509851,
+      "y": 0.32949088220310246
     },
     "_id": ""
   },
@@ -176,11 +176,11 @@
       "a": 255
     },
     "_skeletonData": {
-      "__uuid__": "6d70d1a2-07f3-4cf8-a149-a1fbfd7f02a4",
+      "__uuid__": "520d9b41-a575-479b-9b5e-8ccf0edcb4db",
       "__expectedType__": "sp.SkeletonData"
     },
     "defaultSkin": "default",
-    "defaultAnimation": "stand_right",
+    "defaultAnimation": "show",
     "_premultipliedAlpha": false,
     "_timeScale": 1,
     "_preCacheMode": 0,
@@ -567,7 +567,7 @@
       "__id__": 1
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 24

+ 6 - 6
assets/package/prefab/ui/tower/hero/role102.prefab

@@ -139,13 +139,13 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 191.5,
-      "height": 238
+      "width": 516.3400268554688,
+      "height": 841.530029296875
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
+      "x": 0.2149358902752634,
+      "y": 0.5237602871211785
     },
     "_id": ""
   },
@@ -176,11 +176,11 @@
       "a": 255
     },
     "_skeletonData": {
-      "__uuid__": "6d70d1a2-07f3-4cf8-a149-a1fbfd7f02a4",
+      "__uuid__": "520d9b41-a575-479b-9b5e-8ccf0edcb4db",
       "__expectedType__": "sp.SkeletonData"
     },
     "defaultSkin": "default",
-    "defaultAnimation": "stand_right",
+    "defaultAnimation": "show",
     "_premultipliedAlpha": false,
     "_timeScale": 1,
     "_preCacheMode": 0,

+ 6 - 6
assets/package/prefab/ui/tower/hero/role103.prefab

@@ -139,13 +139,13 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 191.5,
-      "height": 238
+      "width": 516.3400268554688,
+      "height": 841.530029296875
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
+      "x": 0.2149358902752634,
+      "y": 0.5237602871211785
     },
     "_id": ""
   },
@@ -176,11 +176,11 @@
       "a": 255
     },
     "_skeletonData": {
-      "__uuid__": "6d70d1a2-07f3-4cf8-a149-a1fbfd7f02a4",
+      "__uuid__": "520d9b41-a575-479b-9b5e-8ccf0edcb4db",
       "__expectedType__": "sp.SkeletonData"
     },
     "defaultSkin": "default",
-    "defaultAnimation": "stand_right",
+    "defaultAnimation": "",
     "_premultipliedAlpha": false,
     "_timeScale": 1,
     "_preCacheMode": 0,

+ 6 - 6
assets/package/prefab/ui/tower/hero/role104.prefab

@@ -139,13 +139,13 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 191.5,
-      "height": 238
+      "width": 516.3400268554688,
+      "height": 841.530029296875
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
+      "x": 0.2149358902752634,
+      "y": 0.5237602871211785
     },
     "_id": ""
   },
@@ -176,11 +176,11 @@
       "a": 255
     },
     "_skeletonData": {
-      "__uuid__": "6d70d1a2-07f3-4cf8-a149-a1fbfd7f02a4",
+      "__uuid__": "520d9b41-a575-479b-9b5e-8ccf0edcb4db",
       "__expectedType__": "sp.SkeletonData"
     },
     "defaultSkin": "default",
-    "defaultAnimation": "stand_right",
+    "defaultAnimation": "show",
     "_premultipliedAlpha": false,
     "_timeScale": 1,
     "_preCacheMode": 0,

File diff suppressed because it is too large
+ 359 - 123
assets/package/prefab/ui/tower/tower.prefab


+ 83 - 202
assets/package/spine/xiongmao/skeleton.atlas

@@ -1,453 +1,334 @@
 
 skeleton.png
-size: 1508,269
+size: 332,1029
 format: RGBA8888
 filter: Linear,Linear
 repeat: none
 baohua0001
-  rotate: true
-  xy: 181, 84
+  rotate: false
+  xy: 2, 672
   size: 183, 176
   orig: 187, 181
   offset: 2, 2
   index: -1
 baohua0003
-  rotate: true
-  xy: 2, 79
+  rotate: false
+  xy: 2, 850
   size: 188, 177
   orig: 192, 180
   offset: 2, 1
   index: -1
 baohua0005
   rotate: false
-  xy: 513, 95
+  xy: 2, 498
   size: 153, 172
   orig: 158, 177
   offset: 3, 1
   index: -1
 baohua0006
-  rotate: false
-  xy: 359, 94
+  rotate: true
+  xy: 157, 518
   size: 152, 173
   orig: 158, 181
   offset: 3, 2
   index: -1
 baohua0007
   rotate: false
-  xy: 668, 101
+  xy: 2, 330
   size: 158, 166
   orig: 163, 173
   offset: 3, 2
   index: -1
 bei1
-  rotate: true
-  xy: 1038, 127
+  rotate: false
+  xy: 2, 26
   size: 140, 93
   orig: 140, 93
   offset: 0, 0
   index: -1
 bei10
-  rotate: true
-  xy: 189, 4
+  rotate: false
+  xy: 248, 698
   size: 78, 23
   orig: 78, 23
   offset: 0, 0
   index: -1
 ce016
-  rotate: true
-  xy: 189, 4
-  size: 78, 23
-  orig: 78, 23
-  offset: 0, 0
-  index: -1
-ce16
-  rotate: true
-  xy: 189, 4
+  rotate: false
+  xy: 248, 698
   size: 78, 23
   orig: 78, 23
   offset: 0, 0
   index: -1
 bei11
-  rotate: true
-  xy: 1199, 25
+  rotate: false
+  xy: 2, 2
   size: 100, 22
   orig: 100, 22
   offset: 0, 0
   index: -1
 ce017
-  rotate: true
-  xy: 1199, 25
-  size: 100, 22
-  orig: 100, 22
-  offset: 0, 0
-  index: -1
-ce17
-  rotate: true
-  xy: 1199, 25
+  rotate: false
+  xy: 2, 2
   size: 100, 22
   orig: 100, 22
   offset: 0, 0
   index: -1
 zheng14
-  rotate: true
-  xy: 1199, 25
+  rotate: false
+  xy: 2, 2
   size: 100, 22
   orig: 100, 22
   offset: 0, 0
   index: -1
 bei2
   rotate: false
-  xy: 558, 2
+  xy: 144, 25
   size: 50, 30
   orig: 50, 30
   offset: 0, 0
   index: -1
 bei3
-  rotate: true
-  xy: 1365, 32
+  rotate: false
+  xy: 196, 22
   size: 40, 33
   orig: 40, 33
   offset: 0, 0
   index: -1
 bei4
-  rotate: true
-  xy: 828, 112
+  rotate: false
+  xy: 2, 225
   size: 155, 103
   orig: 155, 103
   offset: 0, 0
   index: -1
 bei5
-  rotate: true
-  xy: 1228, 132
-  size: 135, 56
+  rotate: false
+  xy: 162, 461
+  size: 135, 55
   orig: 136, 56
   offset: 0, 0
   index: -1
 bei6
   rotate: true
-  xy: 444, 25
+  xy: 162, 266
   size: 67, 112
   orig: 67, 112
   offset: 0, 0
   index: -1
 bei7
-  rotate: false
-  xy: 662, 2
+  rotate: true
+  xy: 299, 475
   size: 41, 31
   orig: 41, 31
   offset: 0, 0
   index: -1
 bei8
-  rotate: false
-  xy: 662, 2
-  size: 41, 31
-  orig: 41, 31
-  offset: 0, 0
-  index: -1
-ce9
-  rotate: false
-  xy: 662, 2
+  rotate: true
+  xy: 299, 475
   size: 41, 31
   orig: 41, 31
   offset: 0, 0
   index: -1
 bei9
-  rotate: true
-  xy: 2, 2
-  size: 75, 79
-  orig: 75, 79
-  offset: 0, 0
-  index: -1
-ce8
-  rotate: true
-  xy: 2, 2
+  rotate: false
+  xy: 216, 185
   size: 75, 79
   orig: 75, 79
   offset: 0, 0
   index: -1
 ce01
-  rotate: true
-  xy: 1453, 108
+  rotate: false
+  xy: 293, 194
   size: 31, 39
   orig: 31, 39
   offset: 0, 0
   index: -1
 ce010
   rotate: false
-  xy: 214, 15
+  xy: 162, 335
   size: 113, 67
   orig: 113, 67
   offset: 0, 0
   index: -1
 ce011
-  rotate: false
-  xy: 610, 2
+  rotate: true
+  xy: 263, 52
   size: 50, 30
   orig: 50, 30
   offset: 0, 0
   index: -1
 ce012
-  rotate: true
-  xy: 1435, 141
+  rotate: false
+  xy: 276, 278
   size: 40, 33
   orig: 40, 33
   offset: 0, 0
   index: -1
 ce013
-  rotate: true
-  xy: 1133, 127
+  rotate: false
+  xy: 187, 723
   size: 140, 93
   orig: 140, 93
   offset: 0, 0
   index: -1
 ce014
   rotate: false
-  xy: 902, 7
-  size: 155, 103
+  xy: 2, 121
+  size: 155, 102
   orig: 155, 103
   offset: 0, 0
   index: -1
 ce015
-  rotate: true
-  xy: 1286, 132
-  size: 135, 56
+  rotate: false
+  xy: 162, 404
+  size: 135, 55
   orig: 136, 56
   offset: 1, 0
   index: -1
 ce02
   rotate: false
-  xy: 214, 5
+  xy: 276, 268
   size: 15, 8
   orig: 15, 8
   offset: 0, 0
   index: -1
 ce03
-  rotate: true
-  xy: 1223, 2
+  rotate: false
+  xy: 295, 74
   size: 28, 38
   orig: 28, 38
   offset: 0, 0
   index: -1
 ce04
   rotate: false
-  xy: 248, 9
-  size: 27, 4
-  orig: 27, 4
-  offset: 0, 0
-  index: -1
-ce4
-  rotate: false
-  xy: 248, 9
+  xy: 299, 426
   size: 27, 4
   orig: 27, 4
   offset: 0, 0
   index: -1
 ce05
-  rotate: true
-  xy: 558, 34
+  rotate: false
+  xy: 187, 677
   size: 59, 44
   orig: 59, 44
   offset: 0, 0
   index: -1
 ce06
-  rotate: false
-  xy: 1303, 2
+  rotate: true
+  xy: 295, 36
   size: 36, 28
   orig: 36, 28
   offset: 0, 0
   index: -1
 ce07
   rotate: true
-  xy: 1475, 226
+  xy: 299, 432
   size: 41, 31
   orig: 41, 31
   offset: 0, 0
   index: -1
 ce08
-  rotate: true
-  xy: 83, 2
+  rotate: false
+  xy: 216, 104
   size: 75, 79
   orig: 75, 79
   offset: 0, 0
   index: -1
 ce09
   rotate: true
-  xy: 1402, 140
-  size: 41, 31
-  orig: 41, 31
-  offset: 0, 0
-  index: -1
-ce1
-  rotate: true
-  xy: 1453, 75
-  size: 31, 39
-  orig: 31, 39
-  offset: 0, 0
-  index: -1
-ce10
-  rotate: false
-  xy: 329, 15
-  size: 113, 67
-  orig: 113, 67
-  offset: 0, 0
-  index: -1
-ce11
-  rotate: true
-  xy: 1400, 22
-  size: 50, 30
-  orig: 50, 30
-  offset: 0, 0
-  index: -1
-ce12
-  rotate: true
-  xy: 1470, 141
-  size: 40, 33
-  orig: 40, 33
-  offset: 0, 0
-  index: -1
-ce13
-  rotate: false
-  xy: 1223, 32
-  size: 140, 93
-  orig: 140, 93
-  offset: 0, 0
-  index: -1
-ce14
-  rotate: true
-  xy: 933, 112
-  size: 155, 103
-  orig: 155, 103
-  offset: 0, 0
-  index: -1
-ce15
-  rotate: true
-  xy: 1344, 132
-  size: 135, 56
-  orig: 136, 56
-  offset: 0, 0
-  index: -1
-ce2
-  rotate: false
-  xy: 231, 5
-  size: 15, 8
-  orig: 15, 8
-  offset: 0, 0
-  index: -1
-ce3
-  rotate: true
-  xy: 1263, 2
-  size: 28, 38
-  orig: 28, 38
-  offset: 0, 0
-  index: -1
-ce5
-  rotate: true
-  xy: 604, 34
-  size: 59, 44
-  orig: 59, 44
-  offset: 0, 0
-  index: -1
-ce6
-  rotate: false
-  xy: 1341, 2
-  size: 36, 28
-  orig: 36, 28
-  offset: 0, 0
-  index: -1
-ce7
-  rotate: true
-  xy: 1475, 183
-  size: 41, 31
-  orig: 41, 31
-  offset: 0, 0
-  index: -1
-zheng8
-  rotate: true
-  xy: 1475, 183
+  xy: 187, 57
   size: 41, 31
   orig: 41, 31
   offset: 0, 0
   index: -1
 zheng1
   rotate: false
-  xy: 650, 35
+  xy: 159, 100
   size: 50, 58
   orig: 50, 58
   offset: 0, 0
   index: -1
 zheng10
   rotate: true
-  xy: 1432, 35
+  xy: 293, 154
   size: 38, 32
   orig: 38, 32
   offset: 0, 0
   index: -1
 zheng11
-  rotate: false
-  xy: 1466, 41
+  rotate: true
+  xy: 293, 114
   size: 38, 32
   orig: 38, 32
   offset: 0, 0
   index: -1
 zheng12
   rotate: false
-  xy: 1059, 13
+  xy: 192, 915
   size: 138, 112
   orig: 138, 112
   offset: 0, 0
   index: -1
 zheng13
-  rotate: true
-  xy: 164, 7
+  rotate: false
+  xy: 248, 673
   size: 70, 23
   orig: 70, 23
   offset: 0, 0
   index: -1
 zheng2
   rotate: false
-  xy: 845, 6
+  xy: 159, 160
   size: 55, 104
   orig: 55, 104
   offset: 0, 0
   index: -1
 zheng3
   rotate: false
-  xy: 1365, 74
+  xy: 277, 346
   size: 53, 56
   orig: 53, 56
   offset: 0, 0
   index: -1
 zheng4
   rotate: false
-  xy: 1432, 3
+  xy: 238, 20
   size: 30, 30
   orig: 30, 30
   offset: 0, 0
   index: -1
 zheng5
   rotate: false
-  xy: 1432, 226
+  xy: 144, 57
   size: 41, 41
   orig: 41, 41
   offset: 0, 0
   index: -1
 zheng6
   rotate: false
-  xy: 1432, 183
+  xy: 220, 61
   size: 41, 41
   orig: 41, 41
   offset: 0, 0
   index: -1
 zheng7
+  rotate: false
+  xy: 277, 313
+  size: 41, 31
+  orig: 41, 31
+  offset: 0, 0
+  index: -1
+zheng8
   rotate: true
-  xy: 1420, 97
+  xy: 293, 235
   size: 41, 31
   orig: 41, 31
   offset: 0, 0
   index: -1
 zheng9
   rotate: false
-  xy: 705, 4
+  xy: 192, 818
   size: 138, 95
   orig: 138, 95
   offset: 0, 0

File diff suppressed because it is too large
+ 0 - 0
assets/package/spine/xiongmao/skeleton.json


二進制
assets/package/spine/xiongmao/skeleton.png


+ 28 - 28
assets/package/spine/xiongmao/skeleton.png.meta

@@ -46,10 +46,10 @@
         "offsetY": 0,
         "trimX": 2,
         "trimY": 2,
-        "width": 1504,
-        "height": 265,
-        "rawWidth": 1508,
-        "rawHeight": 269,
+        "width": 328,
+        "height": 1025,
+        "rawWidth": 332,
+        "rawHeight": 1029,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -752,
-            -132.5,
+            -164,
+            -512.5,
             0,
-            752,
-            -132.5,
+            164,
+            -512.5,
             0,
-            -752,
-            132.5,
+            -164,
+            512.5,
             0,
-            752,
-            132.5,
+            164,
+            512.5,
             0
           ],
           "indexes": [
@@ -84,32 +84,32 @@
           ],
           "uv": [
             2,
-            267,
-            1506,
-            267,
+            1027,
+            330,
+            1027,
             2,
             2,
-            1506,
+            330,
             2
           ],
           "nuv": [
-            0.001326259946949602,
-            0.007434944237918215,
-            0.9986737400530504,
-            0.007434944237918215,
-            0.001326259946949602,
-            0.9925650557620818,
-            0.9986737400530504,
-            0.9925650557620818
+            0.006024096385542169,
+            0.001943634596695821,
+            0.9939759036144579,
+            0.001943634596695821,
+            0.006024096385542169,
+            0.9980563654033042,
+            0.9939759036144579,
+            0.9980563654033042
           ],
           "minPos": [
-            -752,
-            -132.5,
+            -164,
+            -512.5,
             0
           ],
           "maxPos": [
-            752,
-            132.5,
+            164,
+            512.5,
             0
           ]
         },

+ 16 - 1
assets/script/framework/util/MaterialUtil.ts

@@ -71,9 +71,24 @@ export class MaterialUtil {
                     console.log('游戏筛选图标加载完成:',queue.size);
                 }
             });
+        },  async (next: NextFunction, params: any, args: any) => {
+            assetManager.loadBundle("duplicate", 
+                // {onFileProgress: (finished: number, total: number)=>{
+                //     process.curSub = finished;
+                //     process.maxSub = total;
+                //     if(callback) callback(process);
+                // }},
+                (err, bundle)=>{
+                if (!err) {
+                    process.curMain++
+                    if(callback) callback(process);
+                    next()
+                    console.log('游戏筛选图标加载完成:',queue.size);
+                }
+            });
         });
 
-        process.maxMain = 2;
+        process.maxMain = 3;
         queue.complete = () => {
             console.log('materialUtil初始化完成');
         };

+ 14 - 3
assets/script/game/data/BattleData.ts

@@ -142,10 +142,21 @@ class Data {
         this._duplicate = value
     }
 
-    set layout(value){
-        this._layout = value
+    set layout(layout:{[id:string]:number} | Array<number>){
+        // 兼容旧数据
+        if(Array.isArray(layout)){
+            this._layout = layout
+        }else{
+            this._layout = []
+            Object.values(BattleLayoutPos).forEach(value => {
+                const element = layout[value]
+                if(element != undefined){
+                    this._layout.push(element)
+                }
+            });
+        }
     }
-    get layout(){
+    get layout():number[]{
         return this._layout
     }
 

+ 19 - 3
assets/script/game/manager/BattleManager.ts

@@ -4,6 +4,7 @@ import { BattleData, BattleLayoutData, BattleLayoutPos, BattleLayoutScale, Battl
 import { GameEvent } from "../data/GameEvent";
 import { RoleData } from "../data/RoleData";
 import { UserData } from "../data/UserData";
+import { BattlesConf } from "../ui/tower/conf/BattlesConf";
 import { GoodsManager } from "./GoodsManager";
 //战斗消息管理
 export class BattleManager {
@@ -80,7 +81,7 @@ export class BattleManager {
     // 重置新章节
     static sendBattleDuplicateResetMsg(mapID:number) {
         let args = {
-            chapter_id:mapID, //章节id, 
+            id:mapID, //章节id, 
         }
 
         LoginMgr.sendPost('battle', 'duplicate_reset', (data) => {
@@ -103,10 +104,10 @@ export class BattleManager {
     //领取章节奖励
     static sendBattleDuplicateRewardMsg(mapID:number) {
         let args = {
-            chapter_id:mapID, //章节id
+            id:mapID, //章节id
         }
 
-        LoginMgr.sendPost('battle', 'duplicate', (data) => {
+        LoginMgr.sendPost('battle', 'duplicate_reward', (data) => {
             console.log(data);
             if(data.duplicate_reward){
                 BattleData.duplicateReward = data.duplicate_reward;
@@ -147,4 +148,19 @@ export class BattleManager {
     }
     
 
+
+    //获取可领奖的最大章节
+    static getRewardChapter(){
+        let chapter = BattleData.duplicate.chapter-1;
+        let curProcess = BattleData.duplicate.max_process
+        let battlesConf = BattlesConf.data[curProcess];
+        if(battlesConf){
+            if(curProcess == battlesConf.BossProcess){
+                chapter++;
+            }
+        }
+        
+        return chapter;
+    }
+
 }

+ 39 - 11
assets/script/game/ui/tower/TowerUI.ts

@@ -384,6 +384,7 @@ export class TowerUI extends BaseView {
 				})
 					
 				let winStr = attackData.bWin ? "胜利" : "失败";
+				this.touchCancel();
 				console.log(winStr)
 				
 				let battlesConf = BattlesConf.data[this.battlesID];
@@ -440,6 +441,7 @@ export class TowerUI extends BaseView {
 					},()=>{
 						// this.reStartBattle(this.battlesID)
 					})
+
 				}
 				else{
 					if(this.battlesID%5 != 1){
@@ -556,6 +558,10 @@ export class TowerUI extends BaseView {
 	}
 
 	onTouchCancel(event: EventTouch) {
+		this.touchCancel()
+	}
+
+	touchCancel() {
 		this.radiusNode.active = false;
 		if (this.touchStart) {
 			this.resetHeroPos(this.touchStart)
@@ -618,7 +624,9 @@ export class TowerUI extends BaseView {
 			}
 		}
 		else{
-			return
+			//没数据就认为是第一关
+			this.bStart = true
+			this.battlesID = 1
 		}
 
 		this.battleControl.init(this.battlesID)
@@ -708,7 +716,19 @@ export class TowerUI extends BaseView {
 			}
 		}
 
-
+		let heroData = HeroDataPool.getObject();
+		for (let i = 0; i < BattleUtil.BagListSize; i++) {
+			let bagPos = this.bagPosList[i];
+			if(bagPos.hero){
+				let value = BattleData.layout[i];
+				let battleLayoutData = BattleManager.getDataWithLayoutValue(value)
+				bagPos.hero.position = bagPos.pos;
+				let hero = bagPos.hero.getComponent(Hero);
+				
+				heroData.init(battleLayoutData.typeID,battleLayoutData.level,-1)
+				hero.resetData(heroData);
+			}
+		}
 		for (let i = 0; i < BattleUtil.AttackListSize; i++) {
 			let node = attackChildren[i];
 			if(!node){
@@ -737,11 +757,18 @@ export class TowerUI extends BaseView {
 						this.attackPosList.push(posData);
 					}
 					else{
+
 						posData.posIndex = BattleUtil.BagListSize+i;
 						posData.pos = new Vec3(pos.x, pos.y, 0);
 						posData.posNumber = posNumber;
 						if(posData.hero){
+							let value = BattleData.layout[i+BattleUtil.BagListSize];
+							let battleLayoutData = BattleManager.getDataWithLayoutValue(value)
 							posData.hero.position = posData.pos;
+							let hero = posData.hero.getComponent(Hero);
+							
+							heroData.init(battleLayoutData.typeID,battleLayoutData.level,posNumber)
+							hero.resetData(heroData);
 						}
 					}
 					this.attackPosMap.set(posNumber, posData);
@@ -761,6 +788,7 @@ export class TowerUI extends BaseView {
 			}
 			
 		}
+		HeroDataPool.putObject(heroData);
 
 		let path = "texture/tower/"+mapConf.Background+"/spriteFrame"
 
@@ -779,14 +807,16 @@ export class TowerUI extends BaseView {
 		
 
 
-		this.bStart = false;
+		// this.bStart = false;
 		// this.waitTime = 5;
+		this.operateList = [];
 		this.gameTime = 0;
 		this.powerCur = UserData.status.food
 		this.radiusNode.active = false;
 		this.damageCountData.clear()
 		this.resultNode.active = false
 		this.updateDamageCount()
+		this.powerLabel.string = `${this.powerCur}/${this.powerMax}`;
 	}
 
 
@@ -1054,14 +1084,6 @@ export class TowerUI extends BaseView {
 		
 	}
 
-	onClickStart() {
-		this.bStart = true;
-	}
-
-	onClickStop() {
-		this.bStart = false;
-	}
-
 	onClickAddHero() {
 		Framework.audio.playEffect(AudioID.Click);
 		this.addHero();
@@ -1106,6 +1128,7 @@ export class TowerUI extends BaseView {
 			if(newPosIndex < BattleUtil.BagListSize){
 				this.bagPosList[newPosIndex].hero = hero;
 				hero.position = this.bagPosList[newPosIndex].pos;
+				hero.scale = new Vec3(1,1,1);
 			}
 			else if(newPosIndex < BattleUtil.BagListSize + this.attackPosList.length){
 				let index = newPosIndex - BattleUtil.BagListSize;
@@ -1113,6 +1136,7 @@ export class TowerUI extends BaseView {
 				hero.position = this.attackPosList[index].pos;
 				let heroObj = hero.getComponent(Hero)
 				this.battleControl.addHeroInPos(heroObj.typeID,heroObj.level,index)
+				hero.scale = new Vec3(1.2,1.2,1);
 			}
 			hero.getComponent(Hero).posIndex = newPosIndex
 		}
@@ -1173,6 +1197,7 @@ export class TowerUI extends BaseView {
 			if(posIndex1 < BattleUtil.BagListSize){
 				hero2.position = this.bagPosList[posIndex1].pos;
 				this.bagPosList[posIndex1].hero = hero2;
+				hero2.scale = new Vec3(1,1,1);
 			}
 			else if(posIndex1 < BattleUtil.BagListSize + this.attackPosList.length){
 				hero2.position =  this.attackPosList[posIndex1 - BattleUtil.BagListSize].pos;
@@ -1180,6 +1205,7 @@ export class TowerUI extends BaseView {
 				this.attackPosList[index].hero = hero2;
 				let heroObj = hero2.getComponent(Hero)
 				this.battleControl.addHeroInPos(heroObj.typeID,heroObj.level,index)
+				hero2.scale = new Vec3(1.2,1.2,1);
 			}
 			hero2.getComponent(Hero).stand()
 		}
@@ -1188,6 +1214,7 @@ export class TowerUI extends BaseView {
 			if(posIndex2 < BattleUtil.BagListSize){
 				hero1.position = this.bagPosList[posIndex2].pos;
 				this.bagPosList[posIndex2].hero = hero1;
+				hero1.scale = new Vec3(1,1,1);
 			}
 			else if(posIndex2 < BattleUtil.BagListSize + this.attackPosList.length){
 				hero1.position =  this.attackPosList[posIndex2 - BattleUtil.BagListSize].pos;
@@ -1195,6 +1222,7 @@ export class TowerUI extends BaseView {
 				this.attackPosList[index].hero = hero1;
 				let heroObj = hero1.getComponent(Hero)
 				this.battleControl.addHeroInPos(heroObj.typeID,heroObj.level,index)
+				hero1.scale = new Vec3(1.2,1.2,1);
 			}
 			hero1.getComponent(Hero).stand()
 

+ 1 - 1
assets/script/game/ui/tower/data/HeroData.ts

@@ -54,7 +54,7 @@ export class HeroData extends DataBase{
     protected _raceID: number;
     
     //特殊攻击
-    // spaceValueList:Map<ObjectValueType,BattleUtil.SpecialValue[]> = new Map();
+    spaceValueList:Map<ObjectValueType,BattleUtil.SpecialValue[]> = new Map();
     
     //技能列表
     skillList: number[];

+ 15 - 16
assets/script/game/ui/tower/node/Hero.ts

@@ -75,7 +75,7 @@ export class Hero extends BattleNodeBase {
         this.modelSpine.setEventListener(this.actionCallback.bind(this))
 
         this.battleEventManager = BattleEventManager.instance
-        let bone1 = this.modelSpine.findBone("gun")
+        let bone1 = this.modelSpine.findBone("gun1")
         if(bone1){
             this.attackBone1= bone1
             let rot = this.attackBone1.rotation
@@ -99,7 +99,7 @@ export class Hero extends BattleNodeBase {
             console.log("rot",rot)
         }
 
-        let bone4 = this.modelSpine.findBone("gun")
+        let bone4 = this.modelSpine.findBone("gun1")
         if(bone4){
             this.attackBone4 = bone4
             let rot = this.attackBone4.rotation
@@ -129,7 +129,6 @@ export class Hero extends BattleNodeBase {
         this.modelSpine.timeScale = speedScale;
         this.stand()
         // let id: string = heroData.heroID;
-        
     }
 
 
@@ -186,24 +185,24 @@ export class Hero extends BattleNodeBase {
             this.attackBone4.rotation = 0
 
             if(rotationAngleDegrees<67.5 || rotationAngleDegrees > 292.5){
-                this.attackBone1.rotation = 360-(rotationAngleDegrees+this.attackAngle1)
-                if(this.modelSpine.animation != "attack_right")
-                    this.modelSpine.setAnimation(0, 'attack_right', true);
+                this.attackBone1.rotation = (rotationAngleDegrees+this.attackAngle1)
+                if(this.modelSpine.animation != "atk_right")
+                    this.modelSpine.setAnimation(0, 'atk_right', true);
             }
             else if(rotationAngleDegrees < 112.5){
                 this.attackBone3.rotation = rotationAngleDegrees+this.attackAngle3-90
-                if(this.modelSpine.animation != "attack_up")
-                    this.modelSpine.setAnimation(0, 'attack_up', true);
+                if(this.modelSpine.animation != "atk_up")
+                    this.modelSpine.setAnimation(0, 'atk_up', true);
             }
             else if(rotationAngleDegrees < 247.5){
-                this.attackBone4.rotation = rotationAngleDegrees+this.attackAngle4-180
-                if(this.modelSpine.animation != "attack_left")
-                    this.modelSpine.setAnimation(0, 'attack_left', true);
+                this.attackBone4.rotation = 180-rotationAngleDegrees+this.attackAngle4
+                if(this.modelSpine.animation != "atk_left")
+                    this.modelSpine.setAnimation(0, 'atk_left', true);
             }
             else if(rotationAngleDegrees < 292.5){
                 this.attackBone2.rotation = rotationAngleDegrees+this.attackAngle2-270
-                if(this.modelSpine.animation != "attack_down")
-                    this.modelSpine.setAnimation(0, 'attack_down', true);
+                if(this.modelSpine.animation != "atk_down")
+                    this.modelSpine.setAnimation(0, 'atk_down', true);
             }
         }
 
@@ -241,8 +240,8 @@ export class Hero extends BattleNodeBase {
                 this.attackBone3.rotation = 0
                 this.attackBone4.rotation = 0
                 // this._attackCallback = null;
-        if(this.modelSpine.animation == "stand_right") return; 
-        this.modelSpine.setAnimation(0, 'stand_right', true);
+        if(this.modelSpine.animation == "idle_right") return; 
+        this.modelSpine.setAnimation(0, 'idle_right', true);
         // if(this.modelSpine.node.scale.x < 0)
         //     this.modelSpine.node.scale = new Vec3(-this.modelSpine.node.scale.x,this.modelSpine.node.scale.y,this.modelSpine.node.scale.z);
 
@@ -258,7 +257,7 @@ export class Hero extends BattleNodeBase {
 
     actionCallback(trackEntry){
         //  console.log("动作回调:",trackEntry.animation.name)
-        if (trackEntry.animation.name && trackEntry.animation.name.includes("attack")) {
+        if (trackEntry.animation.name && trackEntry.animation.name.includes("atk")) {
 
             // if (this._attackCallback) {
             //     this._attackCallback(trackEntry);

+ 8 - 0
assets/script/game/ui/tower/node/ResultUI.ts

@@ -44,6 +44,14 @@ export class ResultUI extends Component {
         this._endcallback&&this._endcallback()
         this._endcallback = null
     }
+
+    onTouchButton(event, customStr) {
+        if(event.target.name == "back"){
+            this.node.active = false
+            this._endcallback&&this._endcallback()
+            this._endcallback = null
+        }
+    }
    
 }
 

+ 9 - 0
assets/script/game/ui/tower/node/RewardChapter.ts

@@ -25,6 +25,7 @@ export class RewardChapter extends Component {
     show() {
         this.curChapter = BattleData.duplicate.chapter
         this.node.active = true
+        this.updateChapter()
 
     }
 
@@ -36,6 +37,9 @@ export class RewardChapter extends Component {
         switch (target.name) {
             case "get_btn":
                 // this.node.active = false
+                if(this.curChapter > BattleManager.getRewardChapter()){
+                    return
+                }
                 if(!BattleData.checkDuplicate(this.curChapter)){
                     BattleManager.sendBattleDuplicateRewardMsg(this.curChapter)
                 }
@@ -60,6 +64,11 @@ export class RewardChapter extends Component {
     updateChapter()
     {
         this.curChapterLabel.string = `第 ${this.curChapter} 章`
+       
+        if(this.curChapter > BattleManager.getRewardChapter()){
+            this.tipsChapterLabel.string = ""
+            return
+        }
         if(BattleData.checkDuplicate(this.curChapter)){
             this.tipsChapterLabel.string = "已领取"
         }

+ 4 - 1
assets/sub_bundle/duplicate.meta

@@ -5,5 +5,8 @@
   "uuid": "f50a25fc-58e3-4dab-88ff-305ca9c30916",
   "files": [],
   "subMetas": {},
-  "userData": {}
+  "userData": {
+    "isBundle": true,
+    "priority": 2
+  }
 }

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