轰炸区提示配置修改

main
YuShunyao 2026-06-25 13:01:43 +08:00
parent 158f76ae59
commit fdacd8b6d7
1 changed files with 20 additions and 2 deletions

View File

@ -177,10 +177,28 @@ namespace Gameplay.Level
[HideInInspector] [LabelText("触发条件")] public int triggerTaskID;
[LabelText("使用的子弹id")] public int bombBulletId;
[LabelText("轰炸间隔")] public float intervalTime;
[LabelText("轰炸次数")] public int bombCount;
[LabelText("轰炸次数")] [OnValueChanged("SyncBannerInfoList")] public int bombCount;
[LabelText("最小轰炸中心数量")] public int bombMinCount;
[LabelText("最大轰炸中心数量")] public int bombMaxCount;
[LabelText("是否显示横幅")] public bool showBannerInfo;
[LabelText("是否显示横幅")] public List<bool> showBannerInfoList;
private void SyncBannerInfoList()
{
if (showBannerInfoList == null)
{
showBannerInfoList = new List<bool>(bombCount);
}
int targetCount = Mathf.Max(0, bombCount);
while (showBannerInfoList.Count < targetCount)
{
showBannerInfoList.Add(false);
}
if (showBannerInfoList.Count > targetCount)
{
showBannerInfoList.RemoveRange(targetCount, showBannerInfoList.Count - targetCount);
}
}
}
#region LevelGuide