|
|
@@ -47,7 +47,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
isAddStack = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public override CTask GetFocus()
|
|
|
{
|
|
|
AppBarPanel.OpenPanel(this);
|
|
|
@@ -181,7 +181,8 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
if (places.Contains(eventConfig.placeID))
|
|
|
{
|
|
|
- PlacesConfig placesConfig = ConfigComponent.Instance.Get<PlacesConfig>(eventConfig.placeID);
|
|
|
+ PlacesConfig placesConfig =
|
|
|
+ ConfigComponent.Instance.Get<PlacesConfig>(eventConfig.placeID);
|
|
|
if (!xiantuMap.ContainsKey(placesConfig.bigMapID))
|
|
|
{
|
|
|
xiantuMap.Add(placesConfig.bigMapID, new List<XianTuLogConfig>());
|
|
|
@@ -215,7 +216,15 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
if (places.Contains(eventConfig.placeID) || places.Count <= 0)
|
|
|
{
|
|
|
- AccountFileInfo.EventList eventList = AccountFileInfo.Instance.playerData.completeEvents.FirstOrDefault(cl => cl.eventID == eventConfig.ID);
|
|
|
+ AccountFileInfo.EventList eventList =
|
|
|
+ AccountFileInfo.Instance.playerData.completeEvents.FirstOrDefault(cl =>
|
|
|
+ cl.eventID == eventConfig.ID);
|
|
|
+ if (eventList == null)
|
|
|
+ {
|
|
|
+ eventList = AccountFileInfo.Instance.playerData.eventList.FirstOrDefault(cl =>
|
|
|
+ cl.eventID == eventConfig.ID);
|
|
|
+ }
|
|
|
+
|
|
|
if (eventList != null)
|
|
|
{
|
|
|
count++;
|
|
|
@@ -233,13 +242,13 @@ namespace Fort23.Mono
|
|
|
xianTuDatas.Add(xianTuData2);
|
|
|
}
|
|
|
|
|
|
- xianTuData.name = LanguageManager.Instance.Text(10225, LanguageManager.Instance.Text(bigMapConfig.mapName),count,allCount) ;
|
|
|
+ xianTuData.name = LanguageManager.Instance.Text(10225,
|
|
|
+ LanguageManager.Instance.Text(bigMapConfig.mapName), count, allCount);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public async override CTask<bool> AsyncInit(object[] uiData)
|
|
|
{
|
|
|
-
|
|
|
int selectType = (int)uiData[0];
|
|
|
xianTuLogConfigs = ConfigComponent.Instance.GetAll<XianTuLogConfig>().ToList();
|
|
|
|
|
|
@@ -264,11 +273,13 @@ namespace Fort23.Mono
|
|
|
}
|
|
|
|
|
|
|
|
|
- XianTuSaiXuanWidget xianTuSaiXuanWidget1 = await UIManager.Instance.CreateGComponentForObject<XianTuSaiXuanWidget>(XianTuSaiXuanWidget1, null);
|
|
|
+ XianTuSaiXuanWidget xianTuSaiXuanWidget1 =
|
|
|
+ await UIManager.Instance.CreateGComponentForObject<XianTuSaiXuanWidget>(XianTuSaiXuanWidget1, null);
|
|
|
xianTuSaiXuanWidget1.CustomInit(1, 0);
|
|
|
xianTuSaiXuanWidget1.OnClick = OnClick;
|
|
|
|
|
|
- xianTuSaiXuanWidget1 = await UIManager.Instance.CreateGComponentForObject<XianTuSaiXuanWidget>(XianTuSaiXuanWidget2, null);
|
|
|
+ xianTuSaiXuanWidget1 =
|
|
|
+ await UIManager.Instance.CreateGComponentForObject<XianTuSaiXuanWidget>(XianTuSaiXuanWidget2, null);
|
|
|
xianTuSaiXuanWidget1.CustomInit(2, 0);
|
|
|
xianTuSaiXuanWidget1.OnClick = OnClick;
|
|
|
|
|
|
@@ -280,13 +291,15 @@ namespace Fort23.Mono
|
|
|
// xianTuSaiXuanWidget.OnClick = OnClick;
|
|
|
// bigMapXianTuSaiWidgets.Add(xianTuSaiXuanWidget);
|
|
|
// }
|
|
|
-
|
|
|
- XianTuSaiXuanWidget xianTuSaiXuanWidget = await UIManager.Instance.CreateGComponent<XianTuSaiXuanWidget>(null, BigMapConnect);
|
|
|
+
|
|
|
+ XianTuSaiXuanWidget xianTuSaiXuanWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<XianTuSaiXuanWidget>(null, BigMapConnect);
|
|
|
xianTuSaiXuanWidget.CustomInit(1, bigMapConfigs[0].ID);
|
|
|
xianTuSaiXuanWidget.OnClick = OnClick;
|
|
|
bigMapXianTuSaiWidgets.Add(xianTuSaiXuanWidget);
|
|
|
|
|
|
- eventLogTitleWidget = await UIManager.Instance.CreateGComponentForObject<EventLogTitleWidget>(EventLogTitleWidgetGam, null);
|
|
|
+ eventLogTitleWidget =
|
|
|
+ await UIManager.Instance.CreateGComponentForObject<EventLogTitleWidget>(EventLogTitleWidgetGam, null);
|
|
|
|
|
|
|
|
|
BigMapList.GetChildObj();
|
|
|
@@ -300,7 +313,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
Btn_Event_OnClick();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return await base.AsyncInit(uiData);
|
|
|
}
|
|
|
|
|
|
@@ -327,7 +340,8 @@ namespace Fort23.Mono
|
|
|
PlacesRoot.gameObject.SetActive(true);
|
|
|
foreach (var place in xianTuSaiXuanWidge._bigMapConfig.places)
|
|
|
{
|
|
|
- XianTuSaiXuanWidget xianTuSaiXuanWidget = await UIManager.Instance.CreateGComponent<XianTuSaiXuanWidget>(null, PlacesConnect);
|
|
|
+ XianTuSaiXuanWidget xianTuSaiXuanWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<XianTuSaiXuanWidget>(null, PlacesConnect);
|
|
|
xianTuSaiXuanWidget.CustomInit(2, place);
|
|
|
xianTuSaiXuanWidget.OnClick = OnClick;
|
|
|
placesXianTuSaiWidgets.Add(xianTuSaiXuanWidget);
|
|
|
@@ -411,7 +425,9 @@ namespace Fort23.Mono
|
|
|
|
|
|
if (type == 1)
|
|
|
{
|
|
|
- MainEventLogWidget mainEventLogWidget = await UIManager.Instance.CreateGComponent<MainEventLogWidget>(null, Content.GetComponent<RectTransform>());
|
|
|
+ MainEventLogWidget mainEventLogWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<MainEventLogWidget>(null,
|
|
|
+ Content.GetComponent<RectTransform>());
|
|
|
mainEventLogWidget.CustomInit(xianTuDatas[index].xianTuLogConfig);
|
|
|
|
|
|
return mainEventLogWidget;
|
|
|
@@ -421,7 +437,9 @@ namespace Fort23.Mono
|
|
|
XianTuData xianTuData = xianTuDatas[index];
|
|
|
if (xianTuData.type == 1)
|
|
|
{
|
|
|
- EventLogTitleWidget eventLogTitleWidget = await UIManager.Instance.CreateGComponentForObject<EventLogTitleWidget>(EventLogTitleWidgetGam,null, Content.GetComponent<RectTransform>(),isInstance:true);
|
|
|
+ EventLogTitleWidget eventLogTitleWidget =
|
|
|
+ await UIManager.Instance.CreateGComponentForObject<EventLogTitleWidget>(EventLogTitleWidgetGam,
|
|
|
+ null, Content.GetComponent<RectTransform>(), isInstance: true);
|
|
|
eventLogTitleWidget.CustomInit(xianTuData);
|
|
|
components.Add(eventLogTitleWidget);
|
|
|
// xianTuTitleWidgets.Add(eventLogTitleWidget);
|
|
|
@@ -429,7 +447,9 @@ namespace Fort23.Mono
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- EventLogWidget EventLogWidget = await UIManager.Instance.CreateGComponent<EventLogWidget>(null, Content.GetComponent<RectTransform>());
|
|
|
+ EventLogWidget EventLogWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<EventLogWidget>(null,
|
|
|
+ Content.GetComponent<RectTransform>());
|
|
|
await EventLogWidget.CustomInit(xianTuData, places);
|
|
|
components.Add(EventLogWidget);
|
|
|
return EventLogWidget;
|
|
|
@@ -448,7 +468,8 @@ namespace Fort23.Mono
|
|
|
|
|
|
public async static CTask OpenPanel(int type = 1)
|
|
|
{
|
|
|
- XianTuLogPanel xianTuLogPanel = await UIManager.Instance.LoadAndOpenPanel<XianTuLogPanel>(null,uiData:new object[]{type});
|
|
|
+ XianTuLogPanel xianTuLogPanel =
|
|
|
+ await UIManager.Instance.LoadAndOpenPanel<XianTuLogPanel>(null, uiData: new object[] { type });
|
|
|
}
|
|
|
|
|
|
List<UIComponent> _components = new List<UIComponent>();
|