handleAttack method
This method is called to give damage a this component.
Only receive damage if the method checkCanReceiveDamage return true
.
Implementation
bool handleAttack(
AttackOriginEnum attacker,
double damage,
dynamic identify,
) {
final canReceive = checkCanReceiveDamage(attacker);
if (canReceive) {
onReceiveDamage(attacker, damage, identify);
}
return canReceive;
}