Properties control how data is read or changed.

private int health;

public int Health
{
    get { return health; }
    set { health = Mathf.Max(value, 0); }
}
public int Coins { get; private set; }
public bool IsAlive => health > 0;