public void LevelUpBonus(LevelUpBonus bonus) { switch (bonus._bonusType) { case LevelUpBonusType.HpUp: _maxHp += bonus._val; break; case LevelUpBonusType.CpUp: _cpLimit += bonus._val; break; case LevelUpBonusType.AtkUp: _atk += bonus._val; break; case LevelUpBonusType.DefUp: _def += bonus._val; break; case LevelUpBonusType.Skill: break; default: break; } }
private string BonusText(LevelUpBonus levelUpBonus) { string text = ""; switch (levelUpBonus._bonusType) { case LevelUpBonusType.HpUp: text = "HP最大値\n"; break; case LevelUpBonusType.CpUp: text = "CP最大値\n"; break; case LevelUpBonusType.AtkUp: text = "攻撃力\n"; break; case LevelUpBonusType.DefUp: text = "防御力\n"; break; case LevelUpBonusType.Skill: text = _skillData[levelUpBonus._val].name; break; default: break; } if (levelUpBonus._bonusType != LevelUpBonusType.Skill) { text += "+" + levelUpBonus._val; } return(text); }