This commit is contained in:
2026-03-13 17:58:09 +08:00
parent 777c58b812
commit c76fd85a2c
25 changed files with 1214 additions and 360 deletions
@@ -171,9 +171,9 @@ namespace GeometryTD.CustomComponent
}
float totalWeight = 0f;
for (int rarityIndex = 0; rarityIndex < _rarityWeightBuffer.Length; rarityIndex++)
foreach (var weight in _rarityWeightBuffer)
{
totalWeight += Mathf.Max(0f, _rarityWeightBuffer[rarityIndex]);
totalWeight += Mathf.Max(0f, weight);
}
if (totalWeight <= 0f)