public bool Damage(int amount, DamageType dt, CharacterHealth causer = null) {
Debug.LogFormat("immunity {0} DamageType {1}", immunity, dt);
if ((immunity & dt) == dt) {
Debug.LogFormat("Inmune to {0} attacks", dt);
if (onDamage != null) {
onDamage();
}
if (onImmunity != null) {
onImmunity();
}
return false;
}
return Damage(amount, causer);
}
/// <summary>