예제 #1
0
    /// <summary>
    ///     Heals the player by some number of Health Points
    /// </summary>
    /// <param name="healthPoints">The number of health points to restore</param>
    public void Heal(int healthPoints)
    {
        _combatData = GetComponent <CombatData>();
        _combatData.Heal(healthPoints);

        healthBar.sizeDelta = new Vector2(_combatData.HealthPoints,
                                          healthBar.sizeDelta.y);

        GameManager.Instance.PlayerHealth = _combatData.HealthPoints;
    }