Quellcode durchsuchen

fix:修改事件监听

chenbin vor 2 Tagen
Ursprung
Commit
648c03395a
27 geänderte Dateien mit 190 neuen und 190 gelöschten Zeilen
  1. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Common/ComCurrencyNested/CommonComCurrencyNestedCtrl.cs
  2. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Common/ToastPanel/CommonToastPanelCtrl.cs
  3. 12 12
      Assets/Scripts/Business/Runtime/FGUI/DragonEgg/TreasurePanel/DragonEggTreasurePanelCtrl.cs
  4. 6 6
      Assets/Scripts/Business/Runtime/FGUI/Item/GetItemPanel/ItemGetItemPanelCtrl.cs
  5. 6 6
      Assets/Scripts/Business/Runtime/FGUI/Login/MainPanel/LoginMainPanelCtrl.cs
  6. 4 4
      Assets/Scripts/Business/Runtime/FGUI/Mail/MailPanel/MailMailPanelCtrl.cs
  7. 16 16
      Assets/Scripts/Business/Runtime/FGUI/Mount/DevelopPanel/MountDevelopPanelCtrl.cs
  8. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/CostLabel/PartnerCostLabelCtrl.cs
  9. 4 4
      Assets/Scripts/Business/Runtime/FGUI/Partner/EpiBookDetailPanel/PartnerEpiBookDetailPanelCtrl.cs
  10. 4 4
      Assets/Scripts/Business/Runtime/FGUI/Partner/EpiChangePanel/PartnerEpiChangePanelCtrl.cs
  11. 6 6
      Assets/Scripts/Business/Runtime/FGUI/Partner/EpiDetailInfo/PartnerEpiDetailInfoCtrl.cs
  12. 24 24
      Assets/Scripts/Business/Runtime/FGUI/Partner/EpiMainPanel/PartnerEpiMainPanelCtrl.cs
  13. 4 4
      Assets/Scripts/Business/Runtime/FGUI/Partner/PartnerBookDetailPanel/PartnerPartnerBookDetailPanelCtrl.cs
  14. 12 12
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbBagPanel/PartnerSbBagPanelCtrl.cs
  15. 18 18
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbMainPanel/PartnerSbMainPanelCtrl.cs
  16. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbReplacePanel/PartnerSbReplacePanelCtrl.cs
  17. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbStarUpBtn/PartnerSbStarUpBtnCtrl.cs
  18. 6 6
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbStrengthPanel/PartnerSbStrengthPanelCtrl.cs
  19. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpPanel/PartnerSbUpPanelCtrl.cs
  20. 14 14
      Assets/Scripts/Business/Runtime/FGUI/Player/AwakePanel/PlayerAwakePanelCtrl.cs
  21. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Player/JokSkillNested/PlayerJokSkillNestedCtrl.cs
  22. 10 10
      Assets/Scripts/Business/Runtime/FGUI/Player/MainPanel/PlayerMainPanelCtrl.cs
  23. 4 4
      Assets/Scripts/Business/Runtime/FGUI/TemporaryEquip/BagPanel/TemporaryEquipBagPanelCtrl.cs
  24. 8 8
      Assets/Scripts/Business/Runtime/FGUI/TreasureChest/UpgradePanel/TreasureChestUpgradePanelCtrl.cs
  25. 14 14
      Assets/Scripts/Business/Runtime/Nodes/GameMain/MapComponent.cs
  26. 2 2
      Assets/Scripts/Business/Runtime/Nodes/Login/UIComponent.cs
  27. 2 2
      Assets/Scripts/Business/Runtime/Nodes/Mail/UIComponent.cs

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Common/ComCurrencyNested/CommonComCurrencyNestedCtrl.cs

@@ -31,12 +31,12 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, OnUpdateItemNum);
+            Context.AddListener(EventDefine.UpdataItemData, OnUpdateItemNum);
         }
 
         private void RemoveUIListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, OnUpdateItemNum);
+            Context.RemoveListener(EventDefine.UpdataItemData, OnUpdateItemNum);
         }
 
         #endregion

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Common/ToastPanel/CommonToastPanelCtrl.cs

@@ -31,14 +31,14 @@ namespace FL.FGUI
         }
         private void AddListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.ShowTips, OnShowTips);
+            Context.AddListener(EventDefine.ShowTips, OnShowTips);
         }
 
 
 
         private void RemoveListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.ShowTips, OnShowTips);
+            Context.RemoveListener(EventDefine.ShowTips, OnShowTips);
         }
         #region Tips
         private void OnShowTips(int eventId, object args)

+ 12 - 12
Assets/Scripts/Business/Runtime/FGUI/DragonEgg/TreasurePanel/DragonEggTreasurePanelCtrl.cs

@@ -143,21 +143,21 @@ namespace FL.FGUI
 
         private void AddEventListener()
         {
-            EventSingle.Instance.AddListener(EventDefine.RefreshTreasureProgressUI, RefreshTreasureProgressUI);
-            EventSingle.Instance.AddListener(EventDefine.RefreshTreasureUI, RefreshTreasureUI);
-            EventSingle.Instance.AddListener(EventDefine.OpenDragonTreasureSucess, OpenDragonTreasureSucess);
-            EventSingle.Instance.AddListener(EventDefine.OpenEquipBag, OpenEquipBag);
-            EventSingle.Instance.AddListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, UpdataItemData);
+            Context.AddListener(EventDefine.RefreshTreasureProgressUI, RefreshTreasureProgressUI);
+            Context.AddListener(EventDefine.RefreshTreasureUI, RefreshTreasureUI);
+            Context.AddListener(EventDefine.OpenDragonTreasureSucess, OpenDragonTreasureSucess);
+            Context.AddListener(EventDefine.OpenEquipBag, OpenEquipBag);
+            Context.AddListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
+            Context.AddListener(EventDefine.UpdataItemData, UpdataItemData);
         }
         private void RemoveEventListener() 
         {
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshTreasureProgressUI, RefreshTreasureProgressUI);
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshTreasureUI, RefreshTreasureUI);
-            EventSingle.Instance.RemoveListener(EventDefine.OpenDragonTreasureSucess, OpenDragonTreasureSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.OpenEquipBag, OpenEquipBag);
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, UpdataItemData);
+            Context.RemoveListener(EventDefine.RefreshTreasureProgressUI, RefreshTreasureProgressUI);
+            Context.RemoveListener(EventDefine.RefreshTreasureUI, RefreshTreasureUI);
+            Context.RemoveListener(EventDefine.OpenDragonTreasureSucess, OpenDragonTreasureSucess);
+            Context.RemoveListener(EventDefine.OpenEquipBag, OpenEquipBag);
+            Context.RemoveListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
+            Context.RemoveListener(EventDefine.UpdataItemData, UpdataItemData);
         }
 
 

+ 6 - 6
Assets/Scripts/Business/Runtime/FGUI/Item/GetItemPanel/ItemGetItemPanelCtrl.cs

@@ -76,16 +76,16 @@ namespace FL.FGUI
 
         private void AddEventLisenter()
         {
-            EventSingle.Instance.AddListener(EventDefine.WearEquipSucess, WearEquipSucess);
-            EventSingle.Instance.AddListener(EventDefine.RemoveTemporaryEquip, RemoveTemporaryEquip);
-            EventSingle.Instance.AddListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
+            Context.AddListener(EventDefine.WearEquipSucess, WearEquipSucess);
+            Context.AddListener(EventDefine.RemoveTemporaryEquip, RemoveTemporaryEquip);
+            Context.AddListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
             FrameworkEvent.Instance.AddListener(XGame.Framework.EventDefine.UI_CLOSED, OnUIClosed);
         }
         private void RemoveEventLisenter()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.WearEquipSucess, WearEquipSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.RemoveTemporaryEquip, RemoveTemporaryEquip);
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
+            Context.RemoveListener(EventDefine.WearEquipSucess, WearEquipSucess);
+            Context.RemoveListener(EventDefine.RemoveTemporaryEquip, RemoveTemporaryEquip);
+            Context.RemoveListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
             FrameworkEvent.Instance.RemoveListener(XGame.Framework.EventDefine.UI_CLOSED, OnUIClosed);
         }
 

+ 6 - 6
Assets/Scripts/Business/Runtime/FGUI/Login/MainPanel/LoginMainPanelCtrl.cs

@@ -24,9 +24,9 @@ namespace FL.FGUI
         protected override void OnEnable(object intent)
         {
             AddUIListenres();
-            EventSingle.Instance.AddListener(EventDefine.LoginQufuInfos, OnQufuInfos);
-            EventSingle.Instance.AddListener(EventDefine.LoginPlayerInfos, OnPlayerInfos);
-            EventSingle.Instance.AddListener(EventDefine.LoginPlayerResponse, OnPlayerResponse);
+            Context.AddListener(EventDefine.LoginQufuInfos, OnQufuInfos);
+            Context.AddListener(EventDefine.LoginPlayerInfos, OnPlayerInfos);
+            Context.AddListener(EventDefine.LoginPlayerResponse, OnPlayerResponse);
 
             VM.AccountInput.text = Persistence.Read(PersistenceKeys.last_login_account, string.Empty);
         }
@@ -34,9 +34,9 @@ namespace FL.FGUI
         protected override void OnDisable()
         {
             RemoveUIListenres();
-            EventSingle.Instance.RemoveListener(EventDefine.LoginQufuInfos, OnQufuInfos);
-            EventSingle.Instance.RemoveListener(EventDefine.LoginPlayerInfos, OnPlayerInfos);
-            EventSingle.Instance.RemoveListener(EventDefine.LoginPlayerResponse, OnPlayerResponse);
+            Context.RemoveListener(EventDefine.LoginQufuInfos, OnQufuInfos);
+            Context.RemoveListener(EventDefine.LoginPlayerInfos, OnPlayerInfos);
+            Context.RemoveListener(EventDefine.LoginPlayerResponse, OnPlayerResponse);
 
         }
         #region UI事件

+ 4 - 4
Assets/Scripts/Business/Runtime/FGUI/Mail/MailPanel/MailMailPanelCtrl.cs

@@ -49,8 +49,8 @@ namespace FL.FGUI
             VM.ReadBtn.onClick.Add(OnClickReadBtn);
             VM.GetBtn.onClick.Add(OnClickGetBtn);
             VM.DeleteBtn.onClick.Add(OnClickDeleteBtn);
-            EventSingle.Instance.AddListener(EventDefine.OpenSingleMail, OpenSingleMail);
-            EventSingle.Instance.AddListener(EventDefine.UpMailList, UpMailList);
+            Context.AddListener(EventDefine.OpenSingleMail, OpenSingleMail);
+            Context.AddListener(EventDefine.UpMailList, UpMailList);
 
         }
         private void RemoveUIListenres()
@@ -62,8 +62,8 @@ namespace FL.FGUI
             VM.ReadBtn.onClick.Remove(OnClickReadBtn);
             VM.GetBtn.onClick.Remove(OnClickGetBtn);
             VM.DeleteBtn.onClick.Remove(OnClickDeleteBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.OpenSingleMail, OpenSingleMail);
-            EventSingle.Instance.RemoveListener(EventDefine.UpMailList, UpMailList);
+            Context.RemoveListener(EventDefine.OpenSingleMail, OpenSingleMail);
+            Context.RemoveListener(EventDefine.UpMailList, UpMailList);
 
         }
 

+ 16 - 16
Assets/Scripts/Business/Runtime/FGUI/Mount/DevelopPanel/MountDevelopPanelCtrl.cs

@@ -188,25 +188,25 @@ namespace FL.FGUI
 
         private void AddEventListener()
         {
-            EventSingle.Instance.AddListener(EventDefine.RefreshMountInfo, RefreshMountInfo);
-            EventSingle.Instance.AddListener(EventDefine.ChangeRideState, ChangeRideState);
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, OnUpdateItemNum);
-            EventSingle.Instance.AddListener(EventDefine.FeedMountSucessful, FeedMountSucessful);
-            EventSingle.Instance.AddListener(EventDefine.TrainMountSucessful, TrainMountSucessful);
-            EventSingle.Instance.AddListener(EventDefine.UnlockAdvancedMountSucessful, UnlockAdvancedMountSucessful);
-            EventSingle.Instance.AddListener(EventDefine.UseMountSkillSucessful, UseMountSkillSucessful);
-            EventSingle.Instance.AddListener(EventDefine.UpgradeAdvancedMountSucessful, UpgradeAdvancedMountSucessful);
+            Context.AddListener(EventDefine.RefreshMountInfo, RefreshMountInfo);
+            Context.AddListener(EventDefine.ChangeRideState, ChangeRideState);
+            Context.AddListener(EventDefine.UpdataItemData, OnUpdateItemNum);
+            Context.AddListener(EventDefine.FeedMountSucessful, FeedMountSucessful);
+            Context.AddListener(EventDefine.TrainMountSucessful, TrainMountSucessful);
+            Context.AddListener(EventDefine.UnlockAdvancedMountSucessful, UnlockAdvancedMountSucessful);
+            Context.AddListener(EventDefine.UseMountSkillSucessful, UseMountSkillSucessful);
+            Context.AddListener(EventDefine.UpgradeAdvancedMountSucessful, UpgradeAdvancedMountSucessful);
         }
         private void RemoveEventListener()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshMountInfo, RefreshMountInfo);
-            EventSingle.Instance.RemoveListener(EventDefine.ChangeRideState, ChangeRideState);
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, OnUpdateItemNum);
-            EventSingle.Instance.RemoveListener(EventDefine.FeedMountSucessful, FeedMountSucessful);
-            EventSingle.Instance.RemoveListener(EventDefine.TrainMountSucessful, TrainMountSucessful);
-            EventSingle.Instance.RemoveListener(EventDefine.UnlockAdvancedMountSucessful, UnlockAdvancedMountSucessful);
-            EventSingle.Instance.RemoveListener(EventDefine.UseMountSkillSucessful, UseMountSkillSucessful);
-            EventSingle.Instance.RemoveListener(EventDefine.UpgradeAdvancedMountSucessful, UpgradeAdvancedMountSucessful);
+            Context.RemoveListener(EventDefine.RefreshMountInfo, RefreshMountInfo);
+            Context.RemoveListener(EventDefine.ChangeRideState, ChangeRideState);
+            Context.RemoveListener(EventDefine.UpdataItemData, OnUpdateItemNum);
+            Context.RemoveListener(EventDefine.FeedMountSucessful, FeedMountSucessful);
+            Context.RemoveListener(EventDefine.TrainMountSucessful, TrainMountSucessful);
+            Context.RemoveListener(EventDefine.UnlockAdvancedMountSucessful, UnlockAdvancedMountSucessful);
+            Context.RemoveListener(EventDefine.UseMountSkillSucessful, UseMountSkillSucessful);
+            Context.RemoveListener(EventDefine.UpgradeAdvancedMountSucessful, UpgradeAdvancedMountSucessful);
         }
 
         private void Init()

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/CostLabel/PartnerCostLabelCtrl.cs

@@ -30,12 +30,12 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, OnItemUpdate);
+            Context.AddListener(EventDefine.UpdataItemData, OnItemUpdate);
         }
 
         private void RemoveUIListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, OnItemUpdate);
+            Context.RemoveListener(EventDefine.UpdataItemData, OnItemUpdate);
         }
 
         private void OnItemUpdate(int eventId, object args)

+ 4 - 4
Assets/Scripts/Business/Runtime/FGUI/Partner/EpiBookDetailPanel/PartnerEpiBookDetailPanelCtrl.cs

@@ -37,8 +37,8 @@ namespace FL.FGUI
             VM.LeftBtn.onClick.Add(OnClickLeftBtn);
             VM.RightBtn.onClick.Add(OnClickRightBtn);
             VM.GetBtn.onClick.Add(OnClickGetBtn);
-            EventSingle.Instance.AddListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
-            EventSingle.Instance.AddListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
+            Context.AddListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
+            Context.AddListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
         }
 
         private void RemoveUIListenres()
@@ -46,8 +46,8 @@ namespace FL.FGUI
             VM.LeftBtn.onClick.Remove(OnClickLeftBtn);
             VM.RightBtn.onClick.Remove(OnClickRightBtn);
             VM.GetBtn.onClick.Remove(OnClickGetBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
+            Context.RemoveListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
+            Context.RemoveListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
         }
 
         private void OnRwdGet(int eventId, object args)

+ 4 - 4
Assets/Scripts/Business/Runtime/FGUI/Partner/EpiChangePanel/PartnerEpiChangePanelCtrl.cs

@@ -52,15 +52,15 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.PartnerBinding, OnUpdateList);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphChangeSelect, OnClickItem);
+            Context.AddListener(EventDefine.PartnerBinding, OnUpdateList);
+            Context.AddListener(EventDefine.EpigraphChangeSelect, OnClickItem);
             VM.UpBtn.onClick.Add(OnClickUpBtn);
         }
 
         private void RemoveUIListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, OnUpdateList);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphChangeSelect, OnClickItem);
+            Context.RemoveListener(EventDefine.PartnerBinding, OnUpdateList);
+            Context.RemoveListener(EventDefine.EpigraphChangeSelect, OnClickItem);
             VM.UpBtn.onClick.Remove(OnClickUpBtn);
         }
 

+ 6 - 6
Assets/Scripts/Business/Runtime/FGUI/Partner/EpiDetailInfo/PartnerEpiDetailInfoCtrl.cs

@@ -47,9 +47,9 @@ namespace FL.FGUI
             VM.DownBtn.onClick.Add(OnClickDownBtn);
             VM.GotoBtn.onClick.Add(OnClickGotoBtn);
             VM.RankUpBtn.onClick.Add(OnClickRankUpBtn);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphUpStar, OnEpiUpdate);
-            EventSingle.Instance.AddListener(EventDefine.PartnerBinding, UpdateUpDownBtn);
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, OnItemUpdate);
+            Context.AddListener(EventDefine.EpigraphUpStar, OnEpiUpdate);
+            Context.AddListener(EventDefine.PartnerBinding, UpdateUpDownBtn);
+            Context.AddListener(EventDefine.UpdataItemData, OnItemUpdate);
         }
 
         private void RemoveUIListenres()
@@ -58,9 +58,9 @@ namespace FL.FGUI
             VM.DownBtn.onClick.Remove(OnClickDownBtn);
             VM.GotoBtn.onClick.Remove(OnClickGotoBtn);
             VM.RankUpBtn.onClick.Remove(OnClickRankUpBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphUpStar, OnEpiUpdate);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, UpdateUpDownBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, OnItemUpdate);
+            Context.RemoveListener(EventDefine.EpigraphUpStar, OnEpiUpdate);
+            Context.RemoveListener(EventDefine.PartnerBinding, UpdateUpDownBtn);
+            Context.RemoveListener(EventDefine.UpdataItemData, OnItemUpdate);
         }
 
         private void OnItemUpdate(int eventId, object args)

+ 24 - 24
Assets/Scripts/Business/Runtime/FGUI/Partner/EpiMainPanel/PartnerEpiMainPanelCtrl.cs

@@ -75,34 +75,34 @@ namespace FL.FGUI
         #region 事件监听
         private void AddEventListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.PartnerUp, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.PartnerDown, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.PartnerBinding, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.PartnerStrongAll, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpLevel, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpStar, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.PartnerWearAll, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphWearAll, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphStrongAll, OnUpdateAll);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphFinishUpMode, OnFinishUpMode);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphOpenUpMode, OnOpenUpMode);
-            EventSingle.Instance.AddListener(EventDefine.EpigraphUpModeSelect, OnEpiUpSelect);
+            Context.AddListener(EventDefine.PartnerUp, OnUpdateAll);
+            Context.AddListener(EventDefine.PartnerDown, OnUpdateAll);
+            Context.AddListener(EventDefine.PartnerBinding, OnUpdateAll);
+            Context.AddListener(EventDefine.PartnerStrongAll, OnUpdateAll);
+            Context.AddListener(EventDefine.PartnerUpLevel, OnUpdateAll);
+            Context.AddListener(EventDefine.PartnerUpStar, OnUpdateAll);
+            Context.AddListener(EventDefine.PartnerWearAll, OnUpdateAll);
+            Context.AddListener(EventDefine.EpigraphWearAll, OnUpdateAll);
+            Context.AddListener(EventDefine.EpigraphStrongAll, OnUpdateAll);
+            Context.AddListener(EventDefine.EpigraphFinishUpMode, OnFinishUpMode);
+            Context.AddListener(EventDefine.EpigraphOpenUpMode, OnOpenUpMode);
+            Context.AddListener(EventDefine.EpigraphUpModeSelect, OnEpiUpSelect);
         }
 
         private void RemoveEventListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUp, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerDown, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerStrongAll, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpLevel, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpStar, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerWearAll, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphWearAll, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphStrongAll, OnUpdateAll);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphFinishUpMode, OnFinishUpMode);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphOpenUpMode, OnOpenUpMode);
-            EventSingle.Instance.RemoveListener(EventDefine.EpigraphUpModeSelect, OnEpiUpSelect);
+            Context.RemoveListener(EventDefine.PartnerUp, OnUpdateAll);
+            Context.RemoveListener(EventDefine.PartnerDown, OnUpdateAll);
+            Context.RemoveListener(EventDefine.PartnerBinding, OnUpdateAll);
+            Context.RemoveListener(EventDefine.PartnerStrongAll, OnUpdateAll);
+            Context.RemoveListener(EventDefine.PartnerUpLevel, OnUpdateAll);
+            Context.RemoveListener(EventDefine.PartnerUpStar, OnUpdateAll);
+            Context.RemoveListener(EventDefine.PartnerWearAll, OnUpdateAll);
+            Context.RemoveListener(EventDefine.EpigraphWearAll, OnUpdateAll);
+            Context.RemoveListener(EventDefine.EpigraphStrongAll, OnUpdateAll);
+            Context.RemoveListener(EventDefine.EpigraphFinishUpMode, OnFinishUpMode);
+            Context.RemoveListener(EventDefine.EpigraphOpenUpMode, OnOpenUpMode);
+            Context.RemoveListener(EventDefine.EpigraphUpModeSelect, OnEpiUpSelect);
         }
         #endregion
         private void OnClickOneUpBtn(EventContext context)

+ 4 - 4
Assets/Scripts/Business/Runtime/FGUI/Partner/PartnerBookDetailPanel/PartnerPartnerBookDetailPanelCtrl.cs

@@ -38,8 +38,8 @@ namespace FL.FGUI
             VM.LeftBtn.onClick.Add(OnClickLeftBtn);
             VM.RightBtn.onClick.Add(OnClickRightBtn);
             VM.GetBtn.onClick.Add(OnClickGetBtn);
-            EventSingle.Instance.AddListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
-            EventSingle.Instance.AddListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
+            Context.AddListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
+            Context.AddListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
         }
 
         private void RemoveUIListenres()
@@ -47,8 +47,8 @@ namespace FL.FGUI
             VM.LeftBtn.onClick.Remove(OnClickLeftBtn);
             VM.RightBtn.onClick.Remove(OnClickRightBtn);
             VM.GetBtn.onClick.Remove(OnClickGetBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
+            Context.RemoveListener(EventDefine.PartnerJibanRwdGet, OnRwdGet);
+            Context.RemoveListener(EventDefine.PartnerJibanRwdGetAll, OnRwdGet);
         }
 
         private void OnRwdGet(int eventId, object args)

+ 12 - 12
Assets/Scripts/Business/Runtime/FGUI/Partner/SbBagPanel/PartnerSbBagPanelCtrl.cs

@@ -53,12 +53,12 @@ namespace FL.FGUI
             VM.DengJiBtn.onClick.Add(OnClickSortTypeBtn);
             VM.IDBtn.onClick.Add(OnClickSortTypeBtn);
             VM.PanelEvent.Add(OnClickPanel);
-            EventSingle.Instance.AddListener(EventDefine.PartnerDown, OnUpdateList);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUp, OnUpdateList);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpLevel, OnUpdateList);
-            EventSingle.Instance.AddListener(EventDefine.PartnerStrongAll, OnUpdateList);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpStar, OnUpdateList);
-            EventSingle.Instance.AddListener(EventDefine.PartnerBinding, OnUpdateList);
+            Context.AddListener(EventDefine.PartnerDown, OnUpdateList);
+            Context.AddListener(EventDefine.PartnerUp, OnUpdateList);
+            Context.AddListener(EventDefine.PartnerUpLevel, OnUpdateList);
+            Context.AddListener(EventDefine.PartnerStrongAll, OnUpdateList);
+            Context.AddListener(EventDefine.PartnerUpStar, OnUpdateList);
+            Context.AddListener(EventDefine.PartnerBinding, OnUpdateList);
         }
 
         private void RemoveUIListenres()
@@ -70,12 +70,12 @@ namespace FL.FGUI
             VM.DengJiBtn.onClick.Remove(OnClickSortTypeBtn);
             VM.IDBtn.onClick.Remove(OnClickSortTypeBtn);
             VM.PanelEvent.Remove(OnClickPanel);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerDown, OnUpdateList);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUp, OnUpdateList);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpLevel, OnUpdateList);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerStrongAll, OnUpdateList);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpStar, OnUpdateList);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, OnUpdateList);
+            Context.RemoveListener(EventDefine.PartnerDown, OnUpdateList);
+            Context.RemoveListener(EventDefine.PartnerUp, OnUpdateList);
+            Context.RemoveListener(EventDefine.PartnerUpLevel, OnUpdateList);
+            Context.RemoveListener(EventDefine.PartnerStrongAll, OnUpdateList);
+            Context.RemoveListener(EventDefine.PartnerUpStar, OnUpdateList);
+            Context.RemoveListener(EventDefine.PartnerBinding, OnUpdateList);
         }
 
         private void OnClickPanel()

+ 18 - 18
Assets/Scripts/Business/Runtime/FGUI/Partner/SbMainPanel/PartnerSbMainPanelCtrl.cs

@@ -42,15 +42,15 @@ namespace FL.FGUI
             VM.MaskBtn.onClick.Add(OnClickMaskBtn);
             VM.ConfirmBtn.onClick.Add(OnClickConfirmBtn);
             VM.CancelBtn.onClick.Add(OnClickCancelBtn);
-            EventSingle.Instance.AddListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
-            EventSingle.Instance.AddListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
-            EventSingle.Instance.AddListener(EventDefine.PartnerMainSelect, OnPartnerUpModeSelect);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpLevel, OnUpLevel);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpStar, OnUpStar);
-            EventSingle.Instance.AddListener(EventDefine.PartnerDown, OnSbUp);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUp, OnSbUp);
-            EventSingle.Instance.AddListener(EventDefine.PartnerWearAll, OnSbUp);
-            EventSingle.Instance.AddListener(EventDefine.PartnerBinding, OnSbUp);
+            Context.AddListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
+            Context.AddListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
+            Context.AddListener(EventDefine.PartnerMainSelect, OnPartnerUpModeSelect);
+            Context.AddListener(EventDefine.PartnerUpLevel, OnUpLevel);
+            Context.AddListener(EventDefine.PartnerUpStar, OnUpStar);
+            Context.AddListener(EventDefine.PartnerDown, OnSbUp);
+            Context.AddListener(EventDefine.PartnerUp, OnSbUp);
+            Context.AddListener(EventDefine.PartnerWearAll, OnSbUp);
+            Context.AddListener(EventDefine.PartnerBinding, OnSbUp);
         }
 
         private void RemoveUIListenres()
@@ -63,18 +63,18 @@ namespace FL.FGUI
             VM.MaskBtn.onClick.Remove(OnClickMaskBtn);
             VM.ConfirmBtn.onClick.Remove(OnClickConfirmBtn);
             VM.CancelBtn.onClick.Remove(OnClickCancelBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
-            EventSingle.Instance.RemoveListener(
+            Context.RemoveListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
+            Context.RemoveListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
+            Context.RemoveListener(
                 EventDefine.PartnerMainSelect,
                 OnPartnerUpModeSelect
             );
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpLevel, OnUpLevel);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpStar, OnUpStar);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerDown, OnSbUp);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUp, OnSbUp);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerWearAll, OnSbUp);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, OnSbUp);
+            Context.RemoveListener(EventDefine.PartnerUpLevel, OnUpLevel);
+            Context.RemoveListener(EventDefine.PartnerUpStar, OnUpStar);
+            Context.RemoveListener(EventDefine.PartnerDown, OnSbUp);
+            Context.RemoveListener(EventDefine.PartnerUp, OnSbUp);
+            Context.RemoveListener(EventDefine.PartnerWearAll, OnSbUp);
+            Context.RemoveListener(EventDefine.PartnerBinding, OnSbUp);
         }
 
         private void OnSbUp(int eventId, object args)

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/SbReplacePanel/PartnerSbReplacePanelCtrl.cs

@@ -34,12 +34,12 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+            Context.AddListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
         }
 
         private void RemoveUIListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+            Context.RemoveListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
         }
 
         private void OnSelectUpSb(int eventId, object args)

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/SbStarUpBtn/PartnerSbStarUpBtnCtrl.cs

@@ -29,12 +29,12 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, OnItemUpdate);
+            Context.AddListener(EventDefine.UpdataItemData, OnItemUpdate);
         }
 
         private void RemoveUIListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, OnItemUpdate);
+            Context.RemoveListener(EventDefine.UpdataItemData, OnItemUpdate);
         }
 
         private void OnItemUpdate(int eventId, object args)

+ 6 - 6
Assets/Scripts/Business/Runtime/FGUI/Partner/SbStrengthPanel/PartnerSbStrengthPanelCtrl.cs

@@ -41,9 +41,9 @@ namespace FL.FGUI
             VM.StarUpBtn.VM.PanelEvent.Add(OnClickStarUp);
             VM.LevelUpBtn.VM.PanelEvent.Add(OnClickLevelUp);
             VM.DownBtn.onClick.Add(OnClickDownBtn);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpLevel, OnUpInfo);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpStar, OnUpInfo);
-            EventSingle.Instance.AddListener(EventDefine.PartnerBinding, OnEpiChange);
+            Context.AddListener(EventDefine.PartnerUpLevel, OnUpInfo);
+            Context.AddListener(EventDefine.PartnerUpStar, OnUpInfo);
+            Context.AddListener(EventDefine.PartnerBinding, OnEpiChange);
         }
 
         private void RemoveUIListenres()
@@ -55,9 +55,9 @@ namespace FL.FGUI
             VM.StarUpBtn.VM.PanelEvent.Remove(OnClickStarUp);
             VM.LevelUpBtn.VM.PanelEvent.Remove(OnClickLevelUp);
             VM.DownBtn.onClick.Remove(OnClickDownBtn);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpLevel, OnUpInfo);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpStar, OnUpInfo);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, OnEpiChange);
+            Context.RemoveListener(EventDefine.PartnerUpLevel, OnUpInfo);
+            Context.RemoveListener(EventDefine.PartnerUpStar, OnUpInfo);
+            Context.RemoveListener(EventDefine.PartnerBinding, OnEpiChange);
         }
 
         private void OnClickDownBtn(EventContext eventContext)

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpPanel/PartnerSbUpPanelCtrl.cs

@@ -32,12 +32,12 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            EventSingle.Instance.AddListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+            Context.AddListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
         }
 
         private void RemoveUIListenres()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+            Context.RemoveListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
         }
 
         private void OnSelectUpSb(int eventId, object args)

+ 14 - 14
Assets/Scripts/Business/Runtime/FGUI/Player/AwakePanel/PlayerAwakePanelCtrl.cs

@@ -181,23 +181,23 @@ namespace FL.FGUI
 
         private void AddEventListner()
         {
-            EventSingle.Instance.AddListener(EventDefine.UpdataItemData, UpdataItemData);
-            EventSingle.Instance.AddListener(EventDefine.WakeUpRuneSucess, WakeUpRuneSucess);
-            EventSingle.Instance.AddListener(EventDefine.UpgradeRuneLvSucess, UpgradeRuneLvSucess);
-            EventSingle.Instance.AddListener(EventDefine.ChangePlanIndexSucess, ChangePlanIndexSucess);
-            EventSingle.Instance.AddListener(EventDefine.ResetCurrentPlanSucess,ResetCurrentPlanSucess);
-            EventSingle.Instance.AddListener(EventDefine.ChangePlanNameSucess, ChangePlanNameSucess);
-            EventSingle.Instance.AddListener(EventDefine.ChangeRuneTypeSucess, ChangeRuneTypeSucess);
+            Context.AddListener(EventDefine.UpdataItemData, UpdataItemData);
+            Context.AddListener(EventDefine.WakeUpRuneSucess, WakeUpRuneSucess);
+            Context.AddListener(EventDefine.UpgradeRuneLvSucess, UpgradeRuneLvSucess);
+            Context.AddListener(EventDefine.ChangePlanIndexSucess, ChangePlanIndexSucess);
+            Context.AddListener(EventDefine.ResetCurrentPlanSucess,ResetCurrentPlanSucess);
+            Context.AddListener(EventDefine.ChangePlanNameSucess, ChangePlanNameSucess);
+            Context.AddListener(EventDefine.ChangeRuneTypeSucess, ChangeRuneTypeSucess);
         }
         private void RemoveEventListner()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.UpdataItemData, UpdataItemData);
-            EventSingle.Instance.RemoveListener(EventDefine.WakeUpRuneSucess, WakeUpRuneSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.UpgradeRuneLvSucess, UpgradeRuneLvSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.ChangePlanIndexSucess, ChangePlanIndexSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.ResetCurrentPlanSucess,ResetCurrentPlanSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.ChangePlanNameSucess, ChangePlanNameSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.ChangeRuneTypeSucess, ChangeRuneTypeSucess);
+            Context.RemoveListener(EventDefine.UpdataItemData, UpdataItemData);
+            Context.RemoveListener(EventDefine.WakeUpRuneSucess, WakeUpRuneSucess);
+            Context.RemoveListener(EventDefine.UpgradeRuneLvSucess, UpgradeRuneLvSucess);
+            Context.RemoveListener(EventDefine.ChangePlanIndexSucess, ChangePlanIndexSucess);
+            Context.RemoveListener(EventDefine.ResetCurrentPlanSucess,ResetCurrentPlanSucess);
+            Context.RemoveListener(EventDefine.ChangePlanNameSucess, ChangePlanNameSucess);
+            Context.RemoveListener(EventDefine.ChangeRuneTypeSucess, ChangeRuneTypeSucess);
         }
 
         private void InitUI()

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Player/JokSkillNested/PlayerJokSkillNestedCtrl.cs

@@ -122,12 +122,12 @@ namespace FL.FGUI
 
         private void AddEventListener()
         {
-            EventSingle.Instance.AddListener(EventDefine.AttributeChange, OnChangeAttribute); // 角色属性变化
+            Context.AddListener(EventDefine.AttributeChange, OnChangeAttribute); // 角色属性变化
 
         }
         private void RemoveEventListener()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.AttributeChange, OnChangeAttribute); // 角色属性变化
+            Context.RemoveListener(EventDefine.AttributeChange, OnChangeAttribute); // 角色属性变化
         }
 
         public void Init(Action<bool> clickSkillIcon)

+ 10 - 10
Assets/Scripts/Business/Runtime/FGUI/Player/MainPanel/PlayerMainPanelCtrl.cs

@@ -118,19 +118,19 @@ namespace FL.FGUI
         #endregion
         private void AddEventListener()
         {
-            EventSingle.Instance.AddListener(EventDefine.OnChangeEquip, OnChangeEquip);
-            EventSingle.Instance.AddListener(EventDefine.PlayerExpAdd, AddPlayerExp);
-            EventSingle.Instance.AddListener(EventDefine.RefreshWearEquipUI, RefreshWearEquipUI);
-            EventSingle.Instance.AddListener(EventDefine.TransferSucess, TransferSucess);
-            EventSingle.Instance.AddListener(EventDefine.ResetJobSucess, ResetJobSucess);
+            Context.AddListener(EventDefine.OnChangeEquip, OnChangeEquip);
+            Context.AddListener(EventDefine.PlayerExpAdd, AddPlayerExp);
+            Context.AddListener(EventDefine.RefreshWearEquipUI, RefreshWearEquipUI);
+            Context.AddListener(EventDefine.TransferSucess, TransferSucess);
+            Context.AddListener(EventDefine.ResetJobSucess, ResetJobSucess);
         }
         private void RemoveEventListener()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.OnChangeEquip, OnChangeEquip);
-            EventSingle.Instance.RemoveListener(EventDefine.PlayerExpAdd, AddPlayerExp);
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshWearEquipUI, RefreshWearEquipUI);
-            EventSingle.Instance.RemoveListener(EventDefine.TransferSucess, TransferSucess);
-            EventSingle.Instance.RemoveListener(EventDefine.ResetJobSucess, ResetJobSucess);
+            Context.RemoveListener(EventDefine.OnChangeEquip, OnChangeEquip);
+            Context.RemoveListener(EventDefine.PlayerExpAdd, AddPlayerExp);
+            Context.RemoveListener(EventDefine.RefreshWearEquipUI, RefreshWearEquipUI);
+            Context.RemoveListener(EventDefine.TransferSucess, TransferSucess);
+            Context.RemoveListener(EventDefine.ResetJobSucess, ResetJobSucess);
         }
 
         private void Init()

+ 4 - 4
Assets/Scripts/Business/Runtime/FGUI/TemporaryEquip/BagPanel/TemporaryEquipBagPanelCtrl.cs

@@ -27,15 +27,15 @@ namespace FL.FGUI
         protected override void OnEnable(object intent)
         {
             AddUIListenres();
-            EventSingle.Instance.AddListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
-            EventSingle.Instance.AddListener(EventDefine.OnChangeEquip, OnChangeEquip);
+            Context.AddListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
+            Context.AddListener(EventDefine.OnChangeEquip, OnChangeEquip);
             ShowUI();
         }
         protected override void OnDisable()
         {
             RemoveUIListenres();
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
-            EventSingle.Instance.RemoveListener(EventDefine.OnChangeEquip, OnChangeEquip);
+            Context.RemoveListener(EventDefine.RefreshTemporaryEquip, RefreshTemporaryEquip);
+            Context.RemoveListener(EventDefine.OnChangeEquip, OnChangeEquip);
             _wearEquipPowerMap?.Clear();
             _wearEquipPowerMap = null;
             _equipDataList?.Clear();

+ 8 - 8
Assets/Scripts/Business/Runtime/FGUI/TreasureChest/UpgradePanel/TreasureChestUpgradePanelCtrl.cs

@@ -106,17 +106,17 @@ namespace FL.FGUI
 
         private void AddEventLister()
         {
-            EventSingle.Instance.AddListener(EventDefine.RefreshUpgradeTime, RefreshUpgradeTime);
-            EventSingle.Instance.AddListener(EventDefine.ShowEquipQualityProbability, ShowEquipQualityProbability);
-            EventSingle.Instance.AddListener(EventDefine.RefreshWatchAd, RefreshWatchAd);
-            EventSingle.Instance.AddListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
+            Context.AddListener(EventDefine.RefreshUpgradeTime, RefreshUpgradeTime);
+            Context.AddListener(EventDefine.ShowEquipQualityProbability, ShowEquipQualityProbability);
+            Context.AddListener(EventDefine.RefreshWatchAd, RefreshWatchAd);
+            Context.AddListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
         }
         private void RemoveEventLister()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshUpgradeTime, RefreshUpgradeTime);
-            EventSingle.Instance.RemoveListener(EventDefine.ShowEquipQualityProbability, ShowEquipQualityProbability);
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshWatchAd, RefreshWatchAd);
-            EventSingle.Instance.RemoveListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
+            Context.RemoveListener(EventDefine.RefreshUpgradeTime, RefreshUpgradeTime);
+            Context.RemoveListener(EventDefine.ShowEquipQualityProbability, ShowEquipQualityProbability);
+            Context.RemoveListener(EventDefine.RefreshWatchAd, RefreshWatchAd);
+            Context.RemoveListener(EventDefine.RefreshTreasureChestUI, RefreshTreasureChestUI);
         }
 
 

+ 14 - 14
Assets/Scripts/Business/Runtime/Nodes/GameMain/MapComponent.cs

@@ -57,26 +57,26 @@ namespace FL.Nodes.GameMain
 
         public override void OnEnable(object intent)
         {
-            EventSingle.Instance.AddListener(EventDefine.GameMainMapRemoveEntity, OnRemoveEntity);
-            EventSingle.Instance.AddListener(EventDefine.GameMainMapEndMask, OnMapEndMask);
-            EventSingle.Instance.AddListener(EventDefine.PartnerDown, OnPartnerDown);
-            EventSingle.Instance.AddListener(EventDefine.PartnerUp, OnPartnerUp);
-            EventSingle.Instance.AddListener(EventDefine.PartnerWearAll, OnPartnersChanged);
-            EventSingle.Instance.AddListener(EventDefine.GameMainMapBossTimeout, OnBossTimeout);
-            EventSingle.Instance.AddListener(EventDefine.GameMainMapChallengeBoss, OnChallengeBoss);
+            Context.AddListener(EventDefine.GameMainMapRemoveEntity, OnRemoveEntity);
+            Context.AddListener(EventDefine.GameMainMapEndMask, OnMapEndMask);
+            Context.AddListener(EventDefine.PartnerDown, OnPartnerDown);
+            Context.AddListener(EventDefine.PartnerUp, OnPartnerUp);
+            Context.AddListener(EventDefine.PartnerWearAll, OnPartnersChanged);
+            Context.AddListener(EventDefine.GameMainMapBossTimeout, OnBossTimeout);
+            Context.AddListener(EventDefine.GameMainMapChallengeBoss, OnChallengeBoss);
             //InitMonsters();
             StartMap(PlayerData.Instance.chapterId);
         }
 
         public override void OnDisable()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.GameMainMapRemoveEntity, OnRemoveEntity);
-            EventSingle.Instance.RemoveListener(EventDefine.GameMainMapEndMask, OnMapEndMask);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerDown, OnPartnerDown);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerUp, OnPartnerUp);
-            EventSingle.Instance.RemoveListener(EventDefine.PartnerWearAll, OnPartnersChanged);
-            EventSingle.Instance.RemoveListener(EventDefine.GameMainMapBossTimeout, OnBossTimeout);
-            EventSingle.Instance.RemoveListener(EventDefine.GameMainMapChallengeBoss, OnChallengeBoss);
+            Context.RemoveListener(EventDefine.GameMainMapRemoveEntity, OnRemoveEntity);
+            Context.RemoveListener(EventDefine.GameMainMapEndMask, OnMapEndMask);
+            Context.RemoveListener(EventDefine.PartnerDown, OnPartnerDown);
+            Context.RemoveListener(EventDefine.PartnerUp, OnPartnerUp);
+            Context.RemoveListener(EventDefine.PartnerWearAll, OnPartnersChanged);
+            Context.RemoveListener(EventDefine.GameMainMapBossTimeout, OnBossTimeout);
+            Context.RemoveListener(EventDefine.GameMainMapChallengeBoss, OnChallengeBoss);
 
             _player = null;
             _partnerMap?.Clear();

+ 2 - 2
Assets/Scripts/Business/Runtime/Nodes/Login/UIComponent.cs

@@ -8,13 +8,13 @@ namespace FL.Nodes.Login
         public override void OnEnable(object intent)
         {
             Context.UI.OpenAsync(UIKeys.LoginMainPanel);
-            EventSingle.Instance.AddListener(EventDefine.LoginUserResponse, OnLoginUserResponse);
+            Context.AddListener(EventDefine.LoginUserResponse, OnLoginUserResponse);
         }
 
         public override void OnDisable()
         {
             Context.UI.Close(UIKeys.LoginMainPanel, true);
-            EventSingle.Instance.RemoveListener(EventDefine.LoginUserResponse, OnLoginUserResponse);
+            Context.RemoveListener(EventDefine.LoginUserResponse, OnLoginUserResponse);
         }
         private void OnLoginUserResponse(int eventId, object args)
         {

+ 2 - 2
Assets/Scripts/Business/Runtime/Nodes/Mail/UIComponent.cs

@@ -7,11 +7,11 @@ namespace FL.Nodes.Mail
     {
         public override void OnEnable(object intent)
         {
-            EventSingle.Instance.AddListener(EventDefine.OpenMailUI, OpenMailUI);
+            Context.AddListener(EventDefine.OpenMailUI, OpenMailUI);
         }
         public override void OnDisable()
         {
-            EventSingle.Instance.RemoveListener(EventDefine.OpenMailUI, OpenMailUI);
+            Context.RemoveListener(EventDefine.OpenMailUI, OpenMailUI);
         }
 
         private void OpenMailUI(int eventId, object args)