From 3bd7f56906e31e8fe0072108c9d4652707b51de8 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 21 十月 2025 17:59:00 +0800
Subject: [PATCH] 125 战斗 战斗UI
---
Main/System/Battle/BattleField/StoryBossBattleField.cs | 49 ++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/Main/System/Battle/BattleField/StoryBossBattleField.cs b/Main/System/Battle/BattleField/StoryBossBattleField.cs
index c85ff80..fb71a62 100644
--- a/Main/System/Battle/BattleField/StoryBossBattleField.cs
+++ b/Main/System/Battle/BattleField/StoryBossBattleField.cs
@@ -2,19 +2,14 @@
using LitJson;
using UnityEngine;
using System.Collections.Generic;
+using System.Linq;
public class StoryBossBattleField : BattleField
{
- protected int chapter;// 绔犺妭
- protected int wave;// 娉㈡暟
- protected int level;// 鍏冲崱
protected JsonData extendData;
- protected MainChapterConfig chapterConfig;
-
protected MainLevelConfig levelConfig;
-
public StoryBossBattleField(string _guid) : base(_guid)
{
@@ -26,12 +21,8 @@
{
base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax);
- chapter = FuncLineID / 10000;
- wave = MapID == 1 ? FuncLineID % 100 : 1;//绗嚑娉㈡��
- level = (FuncLineID % 10000) / 100;
-
+ int level = FuncLineID;// 鍏冲崱
extendData = _extendData;
- chapterConfig = MainChapterConfig.Get(chapter);
levelConfig = MainLevelConfig.Get(level);
SetBattleMode(BattleMode.Record);
@@ -128,4 +119,40 @@
}
fsBattleWin.SetBattleField(this);
}
+
+ public NPCLineupConfig GetBossLineupConfig()
+ {
+ if (null == levelConfig)
+ return null;
+
+ int[] bossLineup = levelConfig.BossLineupIDList;
+
+ if (bossLineup.IsNullOrEmpty())
+ return null;
+
+ var lineupID = bossLineup[0];
+
+ if (lineupID > 0)
+ {
+ NPCLineupConfig lineupConfig = NPCLineupConfig.Get(lineupID);
+ return lineupConfig;
+ }
+
+ return null;
+ }
+
+ public override BattleObject FindBoss()
+ {
+ NPCLineupConfig lineupConfig = GetBossLineupConfig();
+ if (lineupConfig != null)
+ {
+ int bossId = lineupConfig.BossID;
+
+ BattleObject bo = battleObjMgr.allBattleObjDict.Values.FirstOrDefault(bo => bo.teamHero.NPCID == bossId);
+
+ return bo;
+ }
+
+ return null;
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0