Effects handling rework
This commit is contained in:
parent
08d593175b
commit
63930450a3
21 changed files with 100 additions and 228 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue