public static string GetAttributesName(AttributesTypeEnum attributesType) { string name = "???"; switch (attributesType) { case AttributesTypeEnum.Cook: name = TextHandler.Instance.manager.GetTextById(1); break; case AttributesTypeEnum.Speed: name = TextHandler.Instance.manager.GetTextById(2); break; case AttributesTypeEnum.Account: name = TextHandler.Instance.manager.GetTextById(3); break; case AttributesTypeEnum.Charm: name = TextHandler.Instance.manager.GetTextById(4); break; case AttributesTypeEnum.Force: name = TextHandler.Instance.manager.GetTextById(5); break; case AttributesTypeEnum.Life: name = TextHandler.Instance.manager.GetTextById(9); break; case AttributesTypeEnum.Lucky: name = TextHandler.Instance.manager.GetTextById(6); break; case AttributesTypeEnum.Loyal: name = TextHandler.Instance.manager.GetTextById(8); break; } return(name); }
private static EffectTypeBean GetEffectDetailsForDamageRateForAttributes(EffectTypeBean effectTypeData, Sprite spRemark) { AttributesTypeEnum attributesType = AttributesTypeEnum.Null; switch (effectTypeData.dataType) { case EffectTypeEnum.DamageRateForLucky: attributesType = AttributesTypeEnum.Lucky; break; case EffectTypeEnum.DamageRateForCook: attributesType = AttributesTypeEnum.Cook; break; case EffectTypeEnum.DamageRateForSpeed: attributesType = AttributesTypeEnum.Speed; break; case EffectTypeEnum.DamageRateForAccount: attributesType = AttributesTypeEnum.Account; break; case EffectTypeEnum.DamageRateForCharm: attributesType = AttributesTypeEnum.Charm; break; case EffectTypeEnum.DamageRateForForce: attributesType = AttributesTypeEnum.Force; break; } effectTypeData.effectData = float.Parse(effectTypeData.data); string attibutesName = AttributesTypeEnumTools.GetAttributesName(attributesType); effectTypeData.effectDescribe = string.Format(TextHandler.Instance.manager.GetTextById(521), attibutesName, effectTypeData.data); effectTypeData.colorIcon = Color.red; effectTypeData.spIconRemark = spRemark; effectTypeData.spIcon = AttributesTypeEnumTools.GetAttributesIcon(attributesType); return(effectTypeData); }