fix: SimulationRunner解析函数缺失 + 变量声明丢失

This commit is contained in:
tian 2026-06-12 14:43:07 +08:00
parent 3e12dba143
commit f2204bf3b4

View File

@ -169,6 +169,8 @@ namespace CounterDrone.Unity
catch { }
return 0.5f;
}
private float ParseCloudRadius(string stateData)
{
try
{
@ -186,7 +188,12 @@ namespace CounterDrone.Unity
var cloud = detail.Cloud;
if (!cloud.RecommendedTiming.HasValue || cloud.RecommendedTiming <= 0) return schedule;
// 齐射展开
var platforms = detail.Equipment.FindAll(e => e.EquipmentRole == (int)EquipmentRole.LaunchPlatform);
if (platforms.Count == 0) return schedule;
var releaseAlt = (float)cloud.DisperseHeight;
if (releaseAlt < 10) releaseAlt = 300f;
var spacing = (float)cloud.SalvoSpacing;
if (spacing <= 0) spacing = 50f;