Assets/Scripts/Generic/BaseCharacter.cs
/// <summary>
/// Lets the character take damage and decide if it needs to die
/// </summary>
/// <param name="damage">the amount of damage taken</param>
Lets the character take damage and decide if it needs to die
Lets the character take damage and decide if it needs to die
public virtual void TakeDamage(float damage)
        {
            Debug.Log($"{gameObject.name}: Taking {damage} damage");
            AdjustHitpoints(Mathf.Abs(damage) * -1);
        }
public virtual void TakeDamage ( float damage ) { Debug . Log ( $" { gameObject . name } : Taking  { damage }  damage " ) ; AdjustHitpoints ( Mathf . Abs ( damage ) * - 1 ) ; }
Lets the character take damage and decide if it needs to die
Lets the character take damage and decide if it needs to die
damage
float
the amount of damage taken
the amount of damage taken