NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/GameWrapper/Level/LevelData.cs

595 lines
21 KiB
C#
Raw Normal View History

2023-08-22 19:08:45 +08:00
using System;
using UnityEngine;
2024-06-04 16:50:16 +08:00
using Sirenix.OdinInspector;
using System.Collections.Generic;
using System.Runtime.Serialization;
2025-07-09 13:12:36 +08:00
using cfg.AICfg;
2023-08-22 19:08:45 +08:00
namespace Gameplay.Level
{
[Serializable]
public class LevelData
{
[Serializable]
public class NPCInfo
2024-11-12 20:31:06 +08:00
{
2025-06-13 12:49:47 +08:00
[HideInInspector] public int index; // LocalID
[HideInInspector] public int id; // 怪物ID
2025-06-26 12:26:14 +08:00
2024-11-12 20:31:06 +08:00
[ReadOnly] [LabelText("位置")] public Vector2Int position;
[LabelText("初始护盾")] public float shield;
[LabelText("初始血量")] public float ph;
[LabelText("初始士气")] public float morale;
[LabelText("Buff")] public List<int> buff = new List<int>();
[LabelText("DeBuff")] public List<int> deBuff = new List<int>();
[HideInInspector] public CharacterToward npcToward;
2024-07-22 14:46:20 +08:00
[LabelText("编组")] public List<int> groups = new List<int>(4);
2025-02-24 19:26:18 +08:00
[LabelText("是否为中途生成AI")] public bool isHideOnLoad;
[LabelText("所属波数")] public int waveIndex;
2025-06-03 14:34:32 +08:00
[LabelText("刷新时间(s)")] public int refreshTime;
2025-07-08 17:00:11 +08:00
[LabelText("巡逻路线ID")] public int patrolRoadID = -1;
2025-06-05 19:03:31 +08:00
[LabelText("显示路径")] public bool showRoadLine;
2025-06-05 15:32:06 +08:00
[LabelText("指定区域ID")] public int specifyRegionID = -1;
2025-06-27 18:06:27 +08:00
[LabelText("预设路径id")] public int presetPathId = -1;
2025-07-04 14:00:11 +08:00
[LabelText("阵营ID 0:己方1:敌方2:中立")] public int troopId;
2025-06-30 19:00:22 +08:00
[LabelText("是否开启侦察")] public bool isOpenInvestigate = true;
2025-07-08 17:00:11 +08:00
}
2023-10-19 15:00:19 +08:00
2025-06-30 14:51:47 +08:00
[Serializable]
2023-10-19 15:00:19 +08:00
public class PatrolInfo
{
2025-07-08 17:00:11 +08:00
[HorizontalGroup("PatrolInfo")] [LabelText("巡逻点位")]
public int cellIndex;
2025-06-26 12:26:14 +08:00
2025-07-08 17:00:11 +08:00
[HideInInspector] public Vector2Int patrolPoint;
2024-11-12 20:31:06 +08:00
[HorizontalGroup("PatrolInfo")] [LabelText("等待时间")]
public float waitTime = 0f;
2023-08-22 19:08:45 +08:00
}
2025-06-26 12:26:14 +08:00
[Serializable]
public class PatrolData
{
[HorizontalGroup("PatrolData")] [ReadOnly]
public int id;
[HorizontalGroup("PatrolData")] [LabelText("巡逻点位数据")]
public List<PatrolInfo> patrolInfos = new();
2025-06-26 12:26:14 +08:00
}
/// <summary>
/// 巡逻路径
/// </summary>
public List<PatrolData> patrolRoadData = new();
2025-06-26 12:26:14 +08:00
/// <summary>
/// 巡逻区域
/// </summary>
public List<PatrolData> patrolRegionData = new();
2025-06-26 12:26:14 +08:00
[Serializable]
2025-05-30 16:42:07 +08:00
public class SpawnMonsterData
{
2025-06-04 14:06:11 +08:00
[LabelText("波次ID")] public int waveIndex;
[LabelText("刷新方式")] public ELevelUnitGenType refreshType = ELevelUnitGenType.Default;
[LabelText("间隔时间")] [ShowIf("@refreshType==ELevelUnitGenType.TimeLoop")]
public int refreshInterval;
2025-06-04 14:06:11 +08:00
[LabelText("最大次数 (-1无限循环), 如果为跳转则表示跳转ID")]
public int maxCount;
2025-07-09 14:55:37 +08:00
[LabelText("首波延迟时间")]
public float firstDelay = 1f; // 首次延迟时间
}
2023-08-22 19:08:45 +08:00
[Serializable]
public class LevelTriggerData
{
[LabelText("触发类型")] public ELevelTriggerType levelTriggerType = ELevelTriggerType.Default;
2025-06-04 14:06:11 +08:00
[LabelText("参数 (时间/区域ID)")] public int triggerTime = 0;
2025-06-04 14:06:11 +08:00
2025-06-03 12:16:38 +08:00
[LabelText("刷怪波次")] public int wave;
2025-06-05 12:27:48 +08:00
[LabelText("任务ID")] [ShowIf("@levelTriggerType==ELevelTriggerType.TaskComplete")]
public int taskID;
[LabelText("触发Effect类型")] public ELevelTriggerEffectType effectType = ELevelTriggerEffectType.StartGenUnit;
2025-06-05 16:49:26 +08:00
[LabelText("怪物波次IDs")] [ShowIf("@effectType==ELevelTriggerEffectType.ForceKillUnits")]
2025-06-05 12:27:48 +08:00
public List<int> waveList = new List<int>();
2025-08-25 15:14:53 +08:00
[LabelText("触发间隔")]
[ShowIf("@effectType==ELevelTriggerEffectType.StartFullSceneDamage")]
public float repeatInterval = 3f; // 重复触发间隔(秒)默认3秒
[LabelText("伤害buffId")]
[ShowIf("@effectType==ELevelTriggerEffectType.StartFullSceneDamage")]
public int damageBuffId = -1; // 触发后给敌方添加的伤害加成buffID默认-1不添加
2025-06-05 12:27:48 +08:00
}
2025-06-05 17:15:49 +08:00
#region LevelGuide
2025-06-06 15:32:28 +08:00
/// <summary>
/// 波次横幅显示
/// </summary>
[Serializable]
public class WaveInfoData
{
[ReadOnly] [LabelText("ID")] public int localID;
[LabelText("触发波次ID")] public int waveID = -1;
[LabelText("第几次循环")] public int loopCount = 1;
[LabelText("是否显示横幅")] public bool showWaveInfo;
}
2025-06-05 17:15:49 +08:00
/// <summary>
/// 关卡进度引导
/// </summary>
2025-06-05 16:49:26 +08:00
[Serializable]
2025-06-05 17:15:49 +08:00
public class ProgressGuideData
2025-06-05 16:49:26 +08:00
{
2025-07-18 13:42:07 +08:00
[LabelText("ID")]
public int id;
2025-06-11 13:31:37 +08:00
[LabelText("关卡进度参数:类型")] public ELevelGuideProgressType progressType;
2025-06-06 12:22:56 +08:00
2025-06-11 13:31:37 +08:00
[LabelText("触发条件")] public ConditionModifier triggerCondition;
2025-06-05 16:49:26 +08:00
2025-06-11 13:31:37 +08:00
[LabelText("完成条件")] public ConditionModifier finishCondition;
2025-06-05 16:49:26 +08:00
2025-06-11 13:31:37 +08:00
public ProgressGuideData(ProgressGuideData data)
{
progressType = data.progressType;
triggerCondition = data.triggerCondition;
finishCondition = data.finishCondition;
}
public ProgressGuideData()
{
progressType = ELevelGuideProgressType.SuccessProgress;
triggerCondition = new ConditionModifier(ConditionUtil.LevelGuideConditionFilter);
finishCondition = new ConditionModifier(ConditionUtil.LevelGuideEndConditionFilter);
}
2025-06-26 12:26:14 +08:00
2025-06-11 16:44:27 +08:00
[OnDeserialized]
public void OnAfterDeserialize(StreamingContext context)
{
triggerCondition.SetFilterTypes(ConditionUtil.LevelGuideConditionFilter);
2025-06-11 20:01:49 +08:00
finishCondition.SetFilterTypes(ConditionUtil.LevelGuideEndConditionFilter);
2025-06-11 16:44:27 +08:00
}
2025-06-05 17:15:49 +08:00
}
2025-06-05 16:49:26 +08:00
2025-06-05 17:15:49 +08:00
/// <summary>
/// 关卡立标引导
/// </summary>
[Serializable]
public class SetFlagGuideData
{
2025-07-18 13:42:07 +08:00
[LabelText("ID")]
public int id;
2025-06-11 13:31:37 +08:00
[LabelText("立标类型")] public ELevelGuideSetFlagType setFlagType;
2025-06-05 17:03:22 +08:00
2025-06-06 14:02:38 +08:00
[LabelText("选择单位类型")] [ShowIf("@setFlagType==ELevelGuideSetFlagType.Unit")]
2025-06-11 13:31:37 +08:00
public ESetFlagUnitType unitType;
2025-06-06 14:02:38 +08:00
2025-06-11 13:31:37 +08:00
[LabelText("对应ID")] public int setFlagID;
2025-06-06 16:31:16 +08:00
2025-06-26 12:26:14 +08:00
[HorizontalGroup("1")] [LabelText("立标提示内容")]
public string setFlagKey;
[HorizontalGroup("1")] [LabelText("备注")]
public string note; // 策划使用备注
2025-06-05 17:03:22 +08:00
2025-06-10 18:45:59 +08:00
[HideInInspector] [LabelText("立标配置ID")]
public int guideTagID; // 编辑器使用
[HideInInspector] [LabelText("立标路径")] public string guideTagPath;
2025-06-11 13:31:37 +08:00
[LabelText("触发条件")] public ConditionModifier triggerCondition;
[LabelText("完成条件")] public ConditionModifier finishCondition;
public SetFlagGuideData(SetFlagGuideData data)
{
setFlagType = data.setFlagType;
unitType = data.unitType;
setFlagID = data.setFlagID;
setFlagKey = data.setFlagKey;
guideTagID = data.guideTagID;
guideTagPath = data.guideTagPath;
triggerCondition = data.triggerCondition;
finishCondition = data.finishCondition;
}
2025-06-05 16:49:26 +08:00
2025-06-11 13:31:37 +08:00
public SetFlagGuideData()
{
setFlagType = ELevelGuideSetFlagType.CellIndex;
unitType = ESetFlagUnitType.Self;
setFlagID = -1;
triggerCondition = new ConditionModifier(ConditionUtil.LevelGuideConditionFilter);
finishCondition = new ConditionModifier(ConditionUtil.LevelGuideEndConditionFilter);
}
2025-06-26 12:26:14 +08:00
2025-06-11 16:44:27 +08:00
[OnDeserialized]
public void OnAfterDeserialize(StreamingContext context)
{
triggerCondition.SetFilterTypes(ConditionUtil.LevelGuideConditionFilter);
2025-06-11 20:01:49 +08:00
finishCondition.SetFilterTypes(ConditionUtil.LevelGuideEndConditionFilter);
2025-06-11 16:44:27 +08:00
}
2025-06-05 16:49:26 +08:00
}
2025-06-05 17:15:49 +08:00
/// <summary>
/// 关卡信息面板引导
/// </summary>
2025-06-05 17:03:22 +08:00
[Serializable]
2025-06-05 17:15:49 +08:00
public class InfoPanelGuideData
2025-06-05 17:03:22 +08:00
{
2025-07-18 13:42:07 +08:00
[LabelText("ID")]
public int id;
2025-06-26 12:26:14 +08:00
[HorizontalGroup("1")] [LabelText("标题ID")]
public string titleKey;
[HorizontalGroup("1")] [LabelText("备注")]
public string noteTitle; // 策划使用备注
[HorizontalGroup("2")] [LabelText("内容ID")]
public string contentKey;
[HorizontalGroup("2")] [LabelText("备注")]
public string noteContent; // 策划使用备注
2025-06-11 13:31:37 +08:00
[LabelText("触发条件")] public ConditionModifier triggerCondition;
2025-06-05 17:15:49 +08:00
2025-06-11 13:31:37 +08:00
[LabelText("完成条件")] public ConditionModifier finishCondition;
public InfoPanelGuideData(InfoPanelGuideData data)
{
titleKey = data.titleKey;
contentKey = data.contentKey;
triggerCondition = data.triggerCondition;
finishCondition = data.finishCondition;
}
public InfoPanelGuideData()
{
triggerCondition = new ConditionModifier(ConditionUtil.LevelGuideConditionFilter);
finishCondition = new ConditionModifier(ConditionUtil.LevelGuideEndConditionFilter);
}
2025-06-26 12:26:14 +08:00
2025-06-11 16:44:27 +08:00
[OnDeserialized]
public void OnAfterDeserialize(StreamingContext context)
{
triggerCondition.SetFilterTypes(ConditionUtil.LevelGuideConditionFilter);
2025-06-11 20:01:49 +08:00
finishCondition.SetFilterTypes(ConditionUtil.LevelGuideEndConditionFilter);
2025-06-11 16:44:27 +08:00
}
2025-06-05 17:03:22 +08:00
}
2025-06-05 17:15:49 +08:00
#endregion
2025-06-05 19:03:31 +08:00
2025-07-08 20:07:21 +08:00
#region 关卡AI广播
/// <summary>
/// AI广播对象类型
/// </summary>
public enum E_AIBroadcastTargetType
{
[LabelText("怪物组")]
EnemyGroup,
[LabelText("所有怪物,包括未出生的")]
AllEnemy,
[LabelText("所有怪物,不包括未出生的")]
AllCurEnemy,
[LabelText("怪物")]
Enemy,
}
2025-07-09 14:22:11 +08:00
/// <summary>
/// AI行为目标类型
/// </summary>
public enum E_AIActionTarget
{
[LabelText("单位目标")]
Unit,
[LabelText("建筑目标")]
Build,
[LabelText("地格目标")]
Cell,
[LabelText("区域目标")]
Area,
[LabelText("路径ID")]
Path,
}
2025-07-09 13:12:36 +08:00
/// <summary>
/// AI预设切换类型
/// </summary>
public enum E_AIPresetChangeType
{
None,
[LabelText("整体预设")]
2025-07-10 13:27:34 +08:00
All = 1,
2025-07-09 13:12:36 +08:00
[LabelText("区域巡逻")]
2025-07-10 13:27:34 +08:00
AreaPatrol = 2,
2025-07-09 13:12:36 +08:00
[LabelText("路径巡逻")]
2025-07-10 13:27:34 +08:00
PathPatrol = 3,
2025-07-09 13:12:36 +08:00
[LabelText("驻守")]
2025-07-10 13:27:34 +08:00
Idle = 4,
[LabelText("常规到达")]
NormalReach = 5,
2025-07-09 13:12:36 +08:00
//[LabelText("上车到达")]
2025-07-10 13:27:34 +08:00
//VehicleReach = 6,
[LabelText("存活")]
Living = 7,
[LabelText("常规")]
Normal = 8,
[LabelText("舍命")]
LayLive = 9,
[LabelText("牛皮糖")]
StickyCandy = 10,
2025-07-09 13:12:36 +08:00
}
2025-07-08 20:07:21 +08:00
/// <summary>
/// AI广播数据
/// </summary>
[Serializable]
public sealed class AIBroadcastData
{
2025-07-09 13:12:36 +08:00
[LabelText("触发条件")]
public ConditionModifier triggerCondition;
2025-07-08 20:07:21 +08:00
[LabelText("AI广播对象类型")]
public E_AIBroadcastTargetType aiBroadcastTargetType;
[LabelText("目标id列表")]
2025-07-09 13:12:36 +08:00
[ShowIf("@E_AIBroadcastTargetType.EnemyGroup == aiBroadcastTargetType || E_AIBroadcastTargetType.Enemy == aiBroadcastTargetType")]
2025-07-08 20:07:21 +08:00
public List<int> listTargetId;
2025-07-09 13:12:36 +08:00
[LabelText("AI行为")]
public EAIAction AIAction;
2025-07-09 14:22:11 +08:00
[LabelText("AI行为目标")]
2025-07-10 12:47:38 +08:00
[ShowIf("@EAIAction.None != AIAction")]
2025-07-09 14:22:11 +08:00
public E_AIActionTarget AIActionTarget;
[LabelText("单位目标id")]
2025-07-09 13:12:36 +08:00
[ShowIf("@EAIAction.None != AIAction")]
2025-07-09 14:22:11 +08:00
public int actionTargetId;
2025-07-09 13:12:36 +08:00
[LabelText("AI状态切换")]
public EAIState AIState;
[LabelText("AI预设切换类型")]
public E_AIPresetChangeType AIPresetChangeType;
[LabelText("AI预设ID")]
[ShowIf("@E_AIPresetChangeType.All == AIPresetChangeType")]
public int AIPresetId;
2025-07-10 13:27:34 +08:00
[LabelText("是否循环巡逻true:循环false:往返")]
[ShowIf("@E_AIPresetChangeType.AreaPatrol == AIPresetChangeType || E_AIPresetChangeType.PathPatrol == AIPresetChangeType")]
public bool isLoopPatrol;
2025-07-09 13:12:36 +08:00
[LabelText("巡逻地点ID")]
[ShowIf("@E_AIPresetChangeType.AreaPatrol == AIPresetChangeType || E_AIPresetChangeType.PathPatrol == AIPresetChangeType")]
public int PatrolId;
[LabelText("入住建筑类型")]
2025-07-10 13:27:34 +08:00
[ShowIf("@E_AIPresetChangeType.Idle == AIPresetChangeType || E_AIPresetChangeType.Normal == AIPresetChangeType || E_AIPresetChangeType.Living == AIPresetChangeType")]
2025-07-09 13:12:36 +08:00
public List<int> listBuildType;
[LabelText("是否回到出生点")]
[ShowIf("@E_AIPresetChangeType.Idle == AIPresetChangeType")]
public bool IsBackBirth;
2025-07-10 13:27:34 +08:00
#region 常规到达
[LabelText("前进速度类型true:移速false:巡逻速度")]
[ShowIf("@E_AIPresetChangeType.NormalReach == AIPresetChangeType")]
public bool reachSpeedType;
[LabelText("遇敌后是否攻击")]
[ShowIf("@E_AIPresetChangeType.NormalReach == AIPresetChangeType")]
public bool reachOpenAttack;
#endregion
#region 存活
[LabelText("是否回到上一个状态")]
[ShowIf("@E_AIPresetChangeType.Living == AIPresetChangeType")]
public bool isBackState;
[LabelText("是否限制追踪距离")]
[ShowIf("@E_AIPresetChangeType.Normal == AIPresetChangeType || E_AIPresetChangeType.LayLive == AIPresetChangeType")]
public bool isLimitDistance;
#endregion
2025-07-09 13:12:36 +08:00
public AIBroadcastData()
{
triggerCondition = new ConditionModifier();
}
2025-07-08 20:07:21 +08:00
}
#endregion
2025-07-02 13:34:22 +08:00
/// <summary>
/// 角色方向(兼容老方向)
/// </summary>
2023-08-22 19:08:45 +08:00
public enum CharacterToward
{
2025-07-02 14:57:40 +08:00
Toward1 = 6,
Toward2 = 1,
Toward3 = 7,
Toward4 = 2,
Toward5 = 8,
Toward6 = 3,
Toward7 = 9,
Toward8 = 4,
Toward9 = 10,
Toward10 = 5,
Toward11 = 11,
Toward12 = 0,
2023-08-22 19:08:45 +08:00
}
2025-06-24 19:31:55 +08:00
// TODO 删除 PVP行为树还在使用
2023-08-22 19:08:45 +08:00
public enum AIType
{
BasicAI,
FallBackAI,
2023-10-19 15:00:19 +08:00
FallBackIntensifyAI,
2023-08-22 19:08:45 +08:00
OutflankAI,
2024-12-04 18:49:20 +08:00
DefendAI,
2025-02-21 17:03:56 +08:00
StupidDefendAI,
2024-11-12 20:31:06 +08:00
None,
2023-08-22 19:08:45 +08:00
}
2025-06-24 19:31:55 +08:00
// TODO 删除 PVP行为树还在使用
2023-08-22 19:08:45 +08:00
public enum AttachAIType
{
None,
ChainAI,
ProvokeAI,
SpecialBehaviorAI,
2024-12-05 16:05:12 +08:00
AttackProtectUnitAI,
2023-08-22 19:08:45 +08:00
}
2023-11-21 15:04:56 +08:00
public LevelData()
{
2023-08-22 19:08:45 +08:00
}
2024-11-12 20:31:06 +08:00
[LabelText("出战区")] [HideInInspector] public int preparingRegionId;
2023-08-22 19:08:45 +08:00
2024-11-12 20:31:06 +08:00
[LabelText("出战区朝向")] [HideInInspector] public CharacterToward preparingRegionToward;
2023-08-22 19:08:45 +08:00
2024-11-12 20:31:06 +08:00
[LabelText("撤退区")] [HideInInspector] public int fallbackRegionId;
2023-08-22 19:08:45 +08:00
2024-11-12 20:31:06 +08:00
[LabelText("敌方撤退区")] [HideInInspector] public int enemyFallbackRegionId;
[LabelText("PVP防守区")] [HideInInspector]
2023-12-26 18:19:05 +08:00
public int pvpDefendRegionId;
2024-11-12 20:31:06 +08:00
[LabelText("PVP防守方朝向")] [HideInInspector]
2023-12-26 18:19:05 +08:00
public CharacterToward pvpDefendToward;
2025-06-10 18:45:59 +08:00
[BoxGroup("支线")] [LabelText("设置该关卡为评分关卡")]
public bool scoreLevel = false;
2024-08-27 14:18:39 +08:00
2025-05-28 17:49:04 +08:00
[BoxGroup("支线")]
[LabelText("星级目标"), HideIf("scoreLevel")]
[ListDrawerSettings(HideAddButton = true, HideRemoveButton = true)]
public List<ConditionModifier> starTarget = new()
{
new ConditionModifier(ConditionUtil.LevelStarConditionFilter),
new ConditionModifier(ConditionUtil.LevelStarConditionFilter),
new ConditionModifier(ConditionUtil.LevelStarConditionFilter)
};
2024-08-27 14:18:39 +08:00
[BoxGroup("支线")]
[LabelText("评分目标"), ShowIf("scoreLevel")]
[ListDrawerSettings(CustomAddFunction = "OnAddScoreCondition")]
2024-08-27 14:18:39 +08:00
public List<ConditionModifier> scoreTarget = new List<ConditionModifier>(15);
private void OnAddScoreCondition()
{
ConditionModifier conditionModifier = new();
conditionModifier.SetFilterTypes(ConditionUtil.LevelScoreConditionFilter, true);
scoreTarget.Add(conditionModifier);
}
2024-06-04 16:50:16 +08:00
[BoxGroup("防守相关设置")] [LabelText("防守关卡数据")]
2025-05-30 16:42:07 +08:00
public List<SpawnMonsterData> spawnMonsterDatas;
2025-06-06 15:32:28 +08:00
[BoxGroup("防守相关设置")] [LabelText("波次横幅显示数据")] [ListDrawerSettings(CustomAddFunction = "OnAddWaveInfoData")]
public List<WaveInfoData> waveInfoDatas = new();
private void OnAddWaveInfoData()
{
var waveInfoData = new WaveInfoData
{
localID = waveInfoDatas.Count + 1
};
waveInfoDatas.Add(waveInfoData);
}
2025-06-05 12:27:48 +08:00
[BoxGroup("触发器")] [LabelText("关卡触发器")] public List<LevelTriggerData> levelTriggerDatas;
2025-06-04 14:06:11 +08:00
2025-06-04 13:44:18 +08:00
[BoxGroup("特殊需求")] [LabelText("初始生命百分值")]
public float initialHealthPercent = 1.0f;
2025-06-04 14:06:11 +08:00
[BoxGroup("特殊需求")] [LabelText("初始护盾百分值")]
public float initialShieldPercent = 1.0f;
2025-06-06 14:02:38 +08:00
2025-06-06 13:27:32 +08:00
#region 关卡引导
2025-06-05 17:03:22 +08:00
2025-06-10 18:45:59 +08:00
[HideInInspector] [LabelText("关卡进度")] public List<ProgressGuideData> progressGuideDatas = new();
2025-06-06 13:27:32 +08:00
2025-06-10 18:45:59 +08:00
[HideInInspector] [LabelText("立标数据")] public List<SetFlagGuideData> setFlagGuideDatas = new();
2025-06-06 13:27:32 +08:00
2025-06-10 18:45:59 +08:00
[HideInInspector] [LabelText("信息板数据")] public List<InfoPanelGuideData> infoPanelGuideDatas = new();
2025-06-06 13:27:32 +08:00
#endregion
2025-07-09 13:12:36 +08:00
#region 关卡AI广播
[HideInInspector]
[LabelText("关卡AI广播进度")]
public List<AIBroadcastData> listAIBroadcastData = new();
#endregion
2025-02-21 17:03:56 +08:00
/// <summary>
/// 刷新生成点位
/// </summary>
[HideInInspector] public List<int> refreshPoints = new List<int>();
[HideInInspector] public List<NPCInfo> npcInfos = new();
2024-11-12 20:31:06 +08:00
2025-06-30 18:46:13 +08:00
[HideInInspector] public List<NPCInfo> midNpcInfos = new();
2024-11-12 20:31:06 +08:00
2025-06-30 18:46:13 +08:00
[HideInInspector] public List<NPCInfo> selfNpcInfos = new();
2025-06-30 14:51:47 +08:00
2025-06-11 12:02:40 +08:00
[HideInInspector] public Dictionary<int, List<int>> npcGroupInfos = new();
2025-09-03 14:43:56 +08:00
/// <summary>
/// 阻挡攻击数据
/// </summary>
[HideInInspector] public List<MapData.BlockSphereInfo> BlockSphereInfos = new();
2024-11-25 13:39:03 +08:00
[Serializable]
public class CaptureInfo
{
2024-11-12 20:31:06 +08:00
[LabelText("占领点位")] public int CapturePoint;
[LabelText("占领时间")] public int CaptureProgress = 0;
}
2024-11-12 20:31:06 +08:00
[HideInInspector] public List<CaptureInfo> CapturePoints = new(8);
2024-11-12 20:31:06 +08:00
2024-11-07 15:05:36 +08:00
[HideInInspector] public List<int> flagStartPoints = new List<int>();
2024-11-12 20:31:06 +08:00
[HideInInspector] public List<int> flagEndPoints = new List<int>();
2024-11-12 20:31:06 +08:00
2024-11-11 13:46:47 +08:00
[HideInInspector] public List<int> fallbackSinglePoints = new List<int>();
2024-11-12 20:31:06 +08:00
2024-11-11 13:46:47 +08:00
[HideInInspector] public List<int> fallbackReusablePoints = new List<int>();
2024-11-12 20:31:06 +08:00
2024-11-26 16:58:42 +08:00
[HideInInspector] public int fallBackCount;
2023-11-08 15:05:19 +08:00
[OnDeserialized]
public void OnAfterDeserialize(StreamingContext context)
{
2023-11-21 15:04:56 +08:00
if (starTarget.Count != 3)
{
starTarget.Clear();
starTarget.Add(new ConditionModifier());
starTarget.Add(new ConditionModifier());
starTarget.Add(new ConditionModifier());
}
2024-11-12 20:31:06 +08:00
2023-11-08 15:05:19 +08:00
foreach (var starCondition in starTarget)
{
starCondition.SetFilterTypes(ConditionUtil.LevelStarConditionFilter);
}
2024-11-12 20:31:06 +08:00
2024-11-01 18:33:42 +08:00
foreach (var scoreCondition in scoreTarget)
{
scoreCondition.SetFilterTypes(ConditionUtil.LevelScoreConditionFilter, scoreLevel);
}
2023-11-08 15:05:19 +08:00
}
2023-08-22 19:08:45 +08:00
}
}