public static Skill Get(SkillSheet.Row skillRow, int power, int chance) { switch (skillRow.SkillType) { case SkillType.Attack: switch (skillRow.SkillCategory) { case SkillCategory.NormalAttack: return(new NormalAttack(skillRow, power, chance)); case SkillCategory.DoubleAttack: return(new DoubleAttack(skillRow, power, chance)); case SkillCategory.BlowAttack: return(new BlowAttack(skillRow, power, chance)); case SkillCategory.AreaAttack: return(new AreaAttack(skillRow, power, chance)); default: return(new NormalAttack(skillRow, power, chance)); } case SkillType.Heal: return(new HealSkill(skillRow, power, chance)); // todo: 코드상에서 버프와 디버프를 버프로 함께 구분하고 있는데, 고도화 될 수록 디버프를 구분해주게 될 것으로 보임. case SkillType.Buff: case SkillType.Debuff: return(new BuffSkill(skillRow, power, chance)); } throw new UnexpectedOperationException( $"{skillRow.Id}, {skillRow.SkillType}, {skillRow.SkillTargetType}, {skillRow.SkillCategory}"); }
public static string GetLocalizedName(this SkillSheet.Row row) { if (row is null) { throw new System.ArgumentNullException(nameof(row)); } return(L10nManager.Localize($"SKILL_NAME_{row.Id}")); }
public HealSkill(SkillSheet.Row skillRow, int power, int chance) : base(skillRow, power, chance) { }
protected Skill(SkillSheet.Row skillRow, int power, int chance) { SkillRow = skillRow; Power = power; Chance = chance; }
protected AttackSkill(SkillSheet.Row skillRow, int power, int chance) : base(skillRow, power, chance) { }
public AreaAttack(SkillSheet.Row skillRow, int power, int chance) : base(skillRow, power, chance) { }
public static Sprite GetIcon(this SkillSheet.Row row) { return(SpriteHelper.GetSkillIcon(row.Id)); }