| 
					
				 | 
			
			
				@@ -25,10 +25,11 @@ import { MailManager } from '../../manager/MailManager'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ViewID } from '../../../framework/config/LayerConf'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { MailData } from '../../data/MailData'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { RoleManager } from '../../manager/RoleManager'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { RoleData } from '../../data/RoleData'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { FightRole, RoleData } from '../../data/RoleData'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { BattleData, BattleLayoutPos, BattleLayoutScale, BattleOptsBase, BattleOptsKill, BattleOptsMerge, BattleOptsMove, BattleOptsNew, BattleOptsRemove, BattleOptsType } from '../../data/BattleData'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { BattleManager } from '../../manager/BattleManager'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { UserData } from '../../data/UserData'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { ResultUI } from './node/ResultUI'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //地图比例尺 1:70 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let mapScale = 72; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -124,6 +125,10 @@ export class TowerUI extends BaseView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@property({ type: [Label], tooltip: "当前管卡展示" }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	levelValue: Label[] = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	@property({ type: Node, tooltip: "结算" }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	resultNode: Node = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	//关卡id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	battlesID: number = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -159,7 +164,7 @@ export class TowerUI extends BaseView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	heroModelMap:Map<number,Prefab> = new Map(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	heroPool: Map<number,Node[]> = new Map(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	//出战角色 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	fightRole = [0,0,0,0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	fightRole:FightRole = [0,0,0,0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	//锁定格子 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	lockBagPosNumber = 6; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	lockAttackPosNumber = 8; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -381,6 +386,9 @@ export class TowerUI extends BaseView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				let winStr = attackData.bWin ? "胜利" : "失败"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				console.log(winStr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.resultNode.getComponent(ResultUI).show(attackData.bWin,attackData.bWin &&(this.battlesID%10==0),()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					this.reStartBattle(this.battlesID) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if(attackData.bWin){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					let layout = {} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -416,21 +424,21 @@ export class TowerUI extends BaseView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					BattleManager.sendBattleDuplicateMsg(this.battlesID,attackData.bWin,layout,this.operateList,()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						if(this.battlesID == 20){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							this.reStartBattle(this.battlesID) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							this.reStartBattle(this.battlesID+1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							this.battlesID++ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					},()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						this.reStartBattle(this.battlesID) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						// this.reStartBattle(this.battlesID) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					if(this.battlesID%5 != 1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						this.reStartBattle(this.battlesID-1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						this.battlesID-- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						this.reStartBattle(this.battlesID) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -581,7 +589,7 @@ export class TowerUI extends BaseView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	onOpen(args) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		this.battlesID = BattleData.duplicate.max_process + 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	//UI关闭时会调用,该函数在onDestroy前调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	onClose() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -743,6 +751,7 @@ export class TowerUI extends BaseView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.powerCur = UserData.status.food 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.radiusNode.active = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.damageCountData.clear() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		this.resultNode.active = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.updateDamageCount() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |