| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 | 
							- using Common.Utility.CombatEvent;
 
- using Fort23.Core;
 
- using GameLogic.Combat.Buff;
 
- namespace Fort23.Mono
 
- {
 
-     [UIBinding(prefab = "BuffWidget")]
 
-     public partial class BuffWidget : UIComponent
 
-     {
 
-         public BuffBasic buffBasic;
 
-         private void Init()
 
-         {
 
-         }
 
-         public override void AddEvent()
 
-         {
 
-             // CombatEventManager.Instance.AddEventListener(CombatEventType.RemoveBuff,
 
-             //     AddBuff);
 
-             // StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
 
-         }
 
-         public override void DelEvent()
 
-         {
 
-             // CombatEventManager.Instance.RemoveEventListener(CombatEventType.RemoveBuff,
 
-             //     AddBuff);
 
-             buffBasic = null;
 
-             // StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
 
-         }
 
-         public override void AddButtonEvent()
 
-         {
 
-             myButton.onClick.AddListener(() =>
 
-             {
 
-                 SkillMassgePanel.OpenSkillSelectPanel(buffBasic.BuffConfig.nameTest,
 
-                     buffBasic.BuffConfig.decTest);
 
-             });
 
-         }
 
-         private async void AddBuff(IEventData iEventData)
 
-         {
 
-             BuffEventData buffEventData = iEventData as BuffEventData;
 
-             if (buffEventData.BuffBasic == buffBasic)
 
-             {
 
-                 UIManager.Instance.DormancyGComponent(this);
 
-             }
 
-         }
 
-         public bool Update()
 
-         {
 
-             if (buffBasic == null||buffBasic.CombatHeroEntity==null)
 
-             {
 
-                 return false;
 
-             }
 
-             if (buffBasic.buffTime > 0)
 
-             {
 
-                 cd.fillAmount = 1 - buffBasic._currTime / buffBasic.buffTime;
 
-             }
 
-             else
 
-             {
 
-                 cd.fillAmount = 0;
 
-             }
 
-             buffCount.text = buffBasic.buffCount.ToString();
 
-             return true;
 
-         }
 
-         public void InitBuff(BuffBasic buffBasic)
 
-         {
 
-             this.buffBasic = buffBasic;
 
-         }
 
-     }
 
- }
 
 
  |