| | |
| | | public static void SetIconWithMoneyType(this Image _image, int moneyType) |
| | | { |
| | | if (_image == null) return; |
| | | string iconKey = StringUtility.Contact("Money_Type_", moneyType); |
| | | _image.SetSprite(iconKey); |
| | | } |
| | | |
| | | public static void SetSmallIconWithMoneyType(this Image _image, int moneyType) |
| | | { |
| | | if (_image == null) return; |
| | | string iconKey = StringUtility.Contact("SmallMoney", moneyType); |
| | | _image.SetSprite(iconKey); |
| | | // string iconKey = StringUtility.Contact("Money_Type_", moneyType); |
| | | if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType)) |
| | | { |
| | | _image.SetOrgSprite(ItemConfig.Get(GeneralDefine.MoneyDisplayModel[moneyType]).IconKey); |
| | | } |
| | | else |
| | | { |
| | | Debug.LogError("MoneyDisplayModel 为配置货币类型:" + moneyType); |
| | | } |
| | | } |
| | | |
| | | public static string GetIconNameWithMoneyType(int moneyType) |
| | | { |
| | | return StringUtility.Contact("Money_Type_", moneyType); |
| | | if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType)) |
| | | { |
| | | return ItemConfig.Get(GeneralDefine.MoneyDisplayModel[moneyType]).IconKey; |
| | | } |
| | | else |
| | | { |
| | | Debug.LogError("MoneyDisplayModel 为配置货币类型:" + moneyType); |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |