// 受到攻击 public void UnderAttack(Charactar user, Skill underSkill) { HP -= underSkill.GetDamage(user); if (HP <= 0) { isDea = true; } }
private void Fight(Charactar sponsor, Skill userSkill, Charactar target) { if (sponsor != null && userSkill != null && target != null) { sponsor.Attack(target, userSkill); ClearCharactars(); IsWonTheFighting(); } }
public override int GetDamage(Charactar user) { return(user.GetAtk()); }
// 攻击 public void Attack(Charactar target, Skill usedSkill) { target.UnderAttack(target, usedSkill); }
public abstract int GetDamage(Charactar user);