using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Beyond { [Serializable] public struct ItemBonus { public enum BonusType { Strength, Strength_Regen, Focus, Focus_Regen, HP, HP_Regen, Stamina, Stamina_Regen, Count }; public BonusType type; public int value; public override string ToString() { const string reg = "reg"; string res = ""; switch (type) { case BonusType.Strength: res = "Str"; break; case BonusType.Strength_Regen: res = "Str " + reg; break; case BonusType.Focus: res = "Fcs"; break; case BonusType.Focus_Regen: res = "Fcs " + reg; break; case BonusType.HP: res = "HP"; break; case BonusType.HP_Regen: res = "HP " + reg; break; case BonusType.Stamina: res = "Stm"; break; case BonusType.Stamina_Regen: res = "Stm " + reg; break; } return res + " +" + value; } } }