📅  最后修改于: 2022-03-11 14:52:41.993000             🧑  作者: Mango
player.damage(damageToDeal);
// For dealing damage to entity convert it to Damageable
if (entity instanceof Damageable) {
((Damageable) entity).damage(damageToDeal);
}