1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using Core.Language;
- using Excel2Json;
- using Fort23.UTool;
- using Utility;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "DaoLvSkillWidget")]
- public partial class DaoLvSkillWidget : UIComponent
- {
- public daolvSkill _daolvSkill;
- private float value;
- private void Init()
- {
- }
- public override void AddEvent()
- {
- }
- public override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- }
- public void CustomInit(int configId, float value)
- {
- _daolvSkill = ConfigComponent.Instance.Get<daolvSkill>(configId);
- this.value = value;
- Text_Name.text = LanguageManager.Instance.Text(_daolvSkill.des, value);
- }
- public void UpdateBl(Map<int, float> bl)
- {
- float updateValue = 0;
- if (bl.ContainsKey(_daolvSkill.ID))
- {
- updateValue = bl[_daolvSkill.ID];
- }
- if (updateValue > value)
- {
- Text_Name.text = LanguageManager.Instance.Text(_daolvSkill.des, value) + "(+" + (updateValue - value) + ")";
- }
- else if (updateValue < value)
- {
- Text_Name.text = LanguageManager.Instance.Text(_daolvSkill.des, value) + "(" + (updateValue - value) + ")";
- }
- }
- }
- }
|