|
@@ -13,6 +13,8 @@ namespace Fort23.Mono
|
|
|
|
|
|
List<ShengShiEventWidgetType2> shengShiEventWidgetTypeList = new List<ShengShiEventWidgetType2>();
|
|
|
|
|
|
+ private ShengShiEventWidgetType2 mainShengShiEventWidgetType2;
|
|
|
+
|
|
|
private int saixuanType = 1;
|
|
|
|
|
|
|
|
@@ -71,11 +73,6 @@ namespace Fort23.Mono
|
|
|
|
|
|
public async override CTask<bool> AsyncInit(object[] uiData)
|
|
|
{
|
|
|
- AccountFileInfo.EventList eventList = EventSystemManager.Instance.GetMainEventDta();
|
|
|
- ShengShiEventWidgetType2 shengShiEventWidgetType2 = await UIManager.Instance.CreateGComponent<ShengShiEventWidgetType2>(null, ShengShiEventWidgetType2Root);
|
|
|
- shengShiEventWidgetType2.CustomInit(eventList, GoOnClick);
|
|
|
- shengShiEventWidgetType2.OnClick = OnClick;
|
|
|
-
|
|
|
await UpdateContent();
|
|
|
return await base.AsyncInit(uiData);
|
|
|
}
|
|
@@ -87,6 +84,12 @@ namespace Fort23.Mono
|
|
|
UIManager.Instance.DormancyGComponent(shengShiEventWidgetType2);
|
|
|
}
|
|
|
|
|
|
+ if (mainShengShiEventWidgetType2 == null)
|
|
|
+ mainShengShiEventWidgetType2 = await UIManager.Instance.CreateGComponent<ShengShiEventWidgetType2>(null, ShengShiEventWidgetType2Root);
|
|
|
+ AccountFileInfo.EventList eventList = EventSystemManager.Instance.GetMainEventDta();
|
|
|
+ mainShengShiEventWidgetType2.CustomInit(eventList, GoOnClick);
|
|
|
+ mainShengShiEventWidgetType2.OnClick = OnClick;
|
|
|
+
|
|
|
shengShiEventWidgetTypeList.Clear();
|
|
|
|
|
|
int maxCount = PlayerManager.Instance.myHero.powerUpConfig.ShenshiMax / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
|
|
@@ -152,10 +155,8 @@ namespace Fort23.Mono
|
|
|
|
|
|
EventSystemManager.Instance.TriggerEvent(shengShiEventWidgetType2.eventList, () =>
|
|
|
{
|
|
|
- // Content.Init(this, showEventList.Count);
|
|
|
this.GObjectPoolInterface.SetActive(true);
|
|
|
UpdateContent();
|
|
|
- // EventSystemManager.Instance.isOpenUi = true;
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -184,6 +185,7 @@ namespace Fort23.Mono
|
|
|
shengShiEventWidgetTypeList.Clear();
|
|
|
EventSystemManager.Instance.isOpenUi = false;
|
|
|
saixuanType = 1;
|
|
|
+ mainShengShiEventWidgetType2 = null;
|
|
|
base.Close();
|
|
|
}
|
|
|
}
|