|
@@ -48,14 +48,7 @@ namespace Fort23.Mono
|
|
if (saixuanType == 1)
|
|
if (saixuanType == 1)
|
|
return;
|
|
return;
|
|
saixuanType = 1;
|
|
saixuanType = 1;
|
|
- SaiXuan(1);
|
|
|
|
- foreach (var shengShiEventWidgetType2 in shengShiEventWidgetTypeList)
|
|
|
|
- {
|
|
|
|
- UIManager.Instance.DormancyGComponent(shengShiEventWidgetType2);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- shengShiEventWidgetTypeList.Clear();
|
|
|
|
- await Content.Init(this, showEventList.Count);
|
|
|
|
|
|
+ UpdateContent();
|
|
});
|
|
});
|
|
|
|
|
|
Btn_DaoYou.onClick.AddListener(async () =>
|
|
Btn_DaoYou.onClick.AddListener(async () =>
|
|
@@ -63,20 +56,15 @@ namespace Fort23.Mono
|
|
if (saixuanType == 2)
|
|
if (saixuanType == 2)
|
|
return;
|
|
return;
|
|
saixuanType = 2;
|
|
saixuanType = 2;
|
|
- SaiXuan(2);
|
|
|
|
- foreach (var shengShiEventWidgetType2 in shengShiEventWidgetTypeList)
|
|
|
|
- {
|
|
|
|
- UIManager.Instance.DormancyGComponent(shengShiEventWidgetType2);
|
|
|
|
- }
|
|
|
|
- shengShiEventWidgetTypeList.Clear();
|
|
|
|
- await Content.Init(this, showEventList.Count);
|
|
|
|
|
|
+ UpdateContent();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
private void RemoveEvent(IEventData e)
|
|
private void RemoveEvent(IEventData e)
|
|
{
|
|
{
|
|
- UIManager.Instance.DormancyAllGComponent<ShengShiEventWidgetType2>();
|
|
|
|
- Content.Init(this, showEventList.Count);
|
|
|
|
|
|
+ // UIManager.Instance.DormancyAllGComponent<ShengShiEventWidgetType2>();
|
|
|
|
+ // Content.Init(this, showEventList.Count);
|
|
|
|
+ UpdateContent();
|
|
}
|
|
}
|
|
|
|
|
|
public async override CTask<bool> AsyncInit(object[] uiData)
|
|
public async override CTask<bool> AsyncInit(object[] uiData)
|
|
@@ -85,11 +73,27 @@ namespace Fort23.Mono
|
|
ShengShiEventWidgetType2 shengShiEventWidgetType2 = await UIManager.Instance.CreateGComponent<ShengShiEventWidgetType2>(null, ShengShiEventWidgetType2Root);
|
|
ShengShiEventWidgetType2 shengShiEventWidgetType2 = await UIManager.Instance.CreateGComponent<ShengShiEventWidgetType2>(null, ShengShiEventWidgetType2Root);
|
|
shengShiEventWidgetType2.CustomInit(eventList, GoOnClick);
|
|
shengShiEventWidgetType2.CustomInit(eventList, GoOnClick);
|
|
shengShiEventWidgetType2.OnClick = OnClick;
|
|
shengShiEventWidgetType2.OnClick = OnClick;
|
|
- SaiXuan(1);
|
|
|
|
- await Content.Init(this, showEventList.Count);
|
|
|
|
|
|
+
|
|
|
|
+ await UpdateContent();
|
|
return await base.AsyncInit(uiData);
|
|
return await base.AsyncInit(uiData);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private async CTask UpdateContent()
|
|
|
|
+ {
|
|
|
|
+ foreach (var shengShiEventWidgetType2 in shengShiEventWidgetTypeList)
|
|
|
|
+ {
|
|
|
|
+ UIManager.Instance.DormancyGComponent(shengShiEventWidgetType2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ shengShiEventWidgetTypeList.Clear();
|
|
|
|
+
|
|
|
|
+ int maxCount = PlayerManager.Instance.myHero.powerUpConfig.ShenshiMax / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
|
|
|
|
+
|
|
|
|
+ Text_ShenShiCount.text = $"神识{EventSystemManager.Instance.GetShenShiCount()}/{maxCount}";
|
|
|
|
+ SaiXuan(saixuanType);
|
|
|
|
+ await Content.Init(this, showEventList.Count);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
public void SaiXuan(int type)
|
|
public void SaiXuan(int type)
|
|
{
|
|
{
|
|
@@ -146,9 +150,10 @@ namespace Fort23.Mono
|
|
|
|
|
|
EventSystemManager.Instance.TriggerEvent(shengShiEventWidgetType2.eventList, () =>
|
|
EventSystemManager.Instance.TriggerEvent(shengShiEventWidgetType2.eventList, () =>
|
|
{
|
|
{
|
|
- Content.Init(this, showEventList.Count);
|
|
|
|
|
|
+ // Content.Init(this, showEventList.Count);
|
|
this.GObjectPoolInterface.SetActive(true);
|
|
this.GObjectPoolInterface.SetActive(true);
|
|
- EventSystemManager.Instance.isOpenUi = true;
|
|
|
|
|
|
+ UpdateContent();
|
|
|
|
+ // EventSystemManager.Instance.isOpenUi = true;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -176,6 +181,7 @@ namespace Fort23.Mono
|
|
UIManager.Instance.DormancyAllGComponent<ShengShiEventWidgetType2>();
|
|
UIManager.Instance.DormancyAllGComponent<ShengShiEventWidgetType2>();
|
|
shengShiEventWidgetTypeList.Clear();
|
|
shengShiEventWidgetTypeList.Clear();
|
|
EventSystemManager.Instance.isOpenUi = false;
|
|
EventSystemManager.Instance.isOpenUi = false;
|
|
|
|
+ saixuanType = 1;
|
|
base.Close();
|
|
base.Close();
|
|
}
|
|
}
|
|
}
|
|
}
|