# Sandbox.Component.IDamageable

A component that can be damaged by something.

- Kind: interface
- Assembly: `Sandbox.Engine`
- Modifiers: abstract

## Properties

- [`Armour`](/api/Sandbox.Component.IDamageable/Armour): Current armour, for others to read and restore. Set it to recharge. How armour absorbs damage, clamping, and what happens at zero are the implementer's business. Reads 0 and ignores writes unless the implementer provides it. A class's own `public float Armour { get; set; }` implements this implicitly, under the same rules as [Sandbox.Component.IDamageable.Health](/api/Sandbox.Component.IDamageable/Health).
- [`Health`](/api/Sandbox.Component.IDamageable/Health): Current health, for others to read and restore. Set it to heal. To hurt, deal damage through `M:Sandbox.Component.IDamageable.OnDamage(Sandbox.DamageInfo@)` instead: setting this raises no damage events. Clamping, and what happens at zero, are the implementer's business. Reads 0 and ignores writes unless the implementer provides it. A class's own `public float Health { get; set; }` implements this implicitly. Accessors bind one by one and nothing warns when they do not. With a public getter but a private, protected, internal or missing setter, reads work and writes are dropped. A property of another type or name, a field, a static or a non-public property does not bind at all, and this reads 0. A subclass does not bind what it adds to a base that already implements [Sandbox.Component.IDamageable](/api/Sandbox.Component.IDamageable), unless it lists the interface again. Such a class implements this member explicitly.
- [`MaxArmour`](/api/Sandbox.Component.IDamageable/MaxArmour): The most armour this normally has, which recharging should stop at. 0 means it has no armour that others can read or restore, which callers check before they use [Sandbox.Component.IDamageable.Armour](/api/Sandbox.Component.IDamageable/Armour). A class's own public `float MaxArmour` getter implements this implicitly, under the same rules as [Sandbox.Component.IDamageable.Health](/api/Sandbox.Component.IDamageable/Health).
- [`MaxHealth`](/api/Sandbox.Component.IDamageable/MaxHealth): The most health this normally has, which healing should stop at. 0 means it has no health that others can read or restore, which callers check before they use [Sandbox.Component.IDamageable.Health](/api/Sandbox.Component.IDamageable/Health). An object can carry several damageables, such as one that only forwards damage, so look for the one that has a maximum. A class's own public `float MaxHealth` getter implements this implicitly, under the same rules as [Sandbox.Component.IDamageable.Health](/api/Sandbox.Component.IDamageable/Health).

## Methods

- [`OnDamage`](/api/Sandbox.Component.IDamageable/OnDamage)
- [`OnTraceAttack`](/api/Sandbox.Component.IDamageable/OnTraceAttack)
