This commit is contained in:
SoulliesOfficial
2026-01-03 18:19:39 -05:00
parent 3bcd7c1cf8
commit 33b1795c1f
7387 changed files with 2762819 additions and 716926 deletions

View File

@@ -0,0 +1,34 @@
using Cielonos.UI;
using UnityEngine;
namespace Cielonos.MainGame.Characters
{
public partial class Player
{
private float deltaTime => selfTimeSm.DeltaTime;
}
public partial class Player
{
private void Regeneration()
{
float healthRegenRate = attributeSm["HealthRegenRate"] * deltaTime;
if (healthRegenRate != 0)
{
attributeSm["Health"] += healthRegenRate;
attributeSm["Health"] = Mathf.Min(attributeSm["Health"], attributeSm["MaximumHealth"]);
PlayerCanvas.Instance.playerInfoUIArea.UpdateHealth(true);
}
float energyRegenRate = attributeSm["EnergyRegenRate"] * deltaTime;
if (energyRegenRate != 0)
{
attributeSm["Energy"] += energyRegenRate;
attributeSm["Energy"] = Mathf.Min(attributeSm["Energy"], attributeSm["MaximumEnergy"]);
PlayerCanvas.Instance.playerInfoUIArea.UpdateEnergy(true);
}
}
}
}