123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using Core.Language;
- using Excel2Json;
- using Fort23.UTool;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "SentimentEffectWidget")]
- public partial class SentimentEffectWidget : ItemWidgetBasic
- {
- public AccountFileInfo.SentimentProperty sentimentProperty;
- SentimentEffectConfig sentimentEffectConfig;
- private void Init()
- {
- }
- public override void AddEvent()
- {
- }
- public override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- base.AddButtonEvent();
- }
- public void CustomInit(AccountFileInfo.SentimentProperty sentimentProperty)
- {
- this.sentimentProperty = sentimentProperty;
- int level = sentimentProperty.level <= 0 ? 1 : sentimentProperty.level;
- int conFigId = sentimentProperty.groupId * 100 + level;
- sentimentEffectConfig = ConfigComponent.Instance.Get<SentimentEffectConfig>(conFigId);
- Text_Name.text = LanguageManager.Instance.Text(sentimentEffectConfig.name);
- if (sentimentProperty.level == 0)
- {
- Text_Level.text = "未激活";
- }
- else
- {
- Text_Level.text = "lv." + level;
- }
- }
- }
- }
|