update: add radius for teleport

This commit is contained in:
Bragin Stepan
2026-02-22 23:06:50 +05:00
parent 542a7a17c2
commit 5f640ce72e
6 changed files with 48 additions and 15 deletions

View File

@@ -45,8 +45,7 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Energy.Systems
if (energyDifference <= 0)
return;
float regenAmountFloat = _maxEnergy.Value * (percentage / 100f);
int regenAmount = (int)math.floor(regenAmountFloat);
int regenAmount= (int)math.floor(_maxEnergy.Value * (percentage / 100f));
if (regenAmount < 1 && _maxEnergy.Value > 0)
regenAmount = 1;