|
@@ -3,7 +3,7 @@ import { BattleTeamId, FightType } from "../../data/const/TypeConst";
|
|
|
import GameDataCenter from "../../data/GameDataCenter";
|
|
|
import UEBase from "../../frameWork/compment/UEBase";
|
|
|
import { eg } from "../../frameWork/eg";
|
|
|
-import { ActionType, fightLogOne, FightStart } from "../../shared/fight/PtlFightTest";
|
|
|
+import { ActionType, FightBase, fightLogOne, FightStart } from "../../shared/base";
|
|
|
import AssetMgr from "../../utils/AssetMgr";
|
|
|
import { BattleGridConstant } from "./BattleGridConstant";
|
|
|
import UEBattleRole from "./UEBattleRole";
|
|
@@ -96,16 +96,15 @@ export default class UEBattleView extends UEBase {
|
|
|
return this.subHpPrefab;
|
|
|
}
|
|
|
//开始战斗
|
|
|
- async onStartFight() {
|
|
|
- GameDataCenter.battle.SendTestFight(async () => {
|
|
|
- eg.poolManager.GetPool("subHPPool").clear();
|
|
|
- this.huihe = 1;
|
|
|
- this.curIndex = 0;
|
|
|
- this.fightStart = GameDataCenter.battle.fightInfo?.fightStart;
|
|
|
- this.fightLogList = GameDataCenter.battle.fightInfo?.log;
|
|
|
- await this.produceRole();
|
|
|
- this.playLog();
|
|
|
- })
|
|
|
+ async onStartFight(fightInfo: FightBase) {
|
|
|
+ GameDataCenter.battle.setFightInfo(fightInfo); //设置战斗数据
|
|
|
+ eg.poolManager.GetPool("subHPPool").clear();
|
|
|
+ this.huihe = 1;
|
|
|
+ this.curIndex = 0;
|
|
|
+ this.fightStart = GameDataCenter.battle.fightInfo?.fightStart;
|
|
|
+ this.fightLogList = GameDataCenter.battle.fightInfo?.log;
|
|
|
+ await this.produceRole();
|
|
|
+ this.playLog();
|
|
|
}
|
|
|
async produceRole() {
|
|
|
//生产角色
|