Beispiel #1
0
    void SyncPlayerHealthWithHeartContainers(bool restoreHealth = false)
    {
        HealthController hc = CommonObjects.Player_C.GetComponent <HealthController>();

        hc.maxHealth = PlayerHealthDelegate.HalfHeartsToHealth(GetItem("HeartContainer").count * 2);
        if (restoreHealth)
        {
            hc.RestoreHealth();
        }
    }
Beispiel #2
0
    public void RestoreHalfHearts(int halfHearts)
    {
        if (halfHearts <= 0)
        {
            return;
        }

        int healAmount = PlayerHealthDelegate.HalfHeartsToHealth(halfHearts);

        HealthController.RestoreHealth((uint)healAmount);
    }