void SyncPlayerHealthWithHeartContainers(bool restoreHealth = false) { HealthController hc = CommonObjects.Player_C.GetComponent <HealthController>(); hc.maxHealth = PlayerHealthDelegate.HalfHeartsToHealth(GetItem("HeartContainer").count * 2); if (restoreHealth) { hc.RestoreHealth(); } }
public void RestoreHalfHearts(int halfHearts) { if (halfHearts <= 0) { return; } int healAmount = PlayerHealthDelegate.HalfHeartsToHealth(halfHearts); HealthController.RestoreHealth((uint)healAmount); }