Effects handling rework

This commit is contained in:
Rendo 2025-07-07 17:29:10 +05:00
commit 63930450a3
21 changed files with 100 additions and 228 deletions

View file

@ -14,9 +14,9 @@ public partial class DegradingSprite : Sprite2D
armor.ArmorDamaged += OnZombieHPChanged;
}
private void OnZombieHPChanged(int hp)
private void OnZombieHPChanged(float hp)
{
float percent = (float)hp / (float)armor.MaxHP;
float percent = hp / armor.MaxHP;
for (int i = 0; i < degradationStages.Count; i++)
{
if (percent <= thresholdPercentage[i])