|
@@ -23,30 +23,26 @@ namespace Fort23.Mono
|
|
|
|
|
|
public override void AddEvent()
|
|
public override void AddEvent()
|
|
{
|
|
{
|
|
- EventManager.Instance.AddEventListener(CustomEventType.UpdateZuiZhongEvent,UpdateZuiZhongEvent);
|
|
|
|
|
|
+ EventManager.Instance.AddEventListener(CustomEventType.UpdateZuiZhongEvent, UpdateZuiZhongEvent);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
public override void DelEvent()
|
|
public override void DelEvent()
|
|
{
|
|
{
|
|
- EventManager.Instance.RemoveEventListener(CustomEventType.UpdateZuiZhongEvent,UpdateZuiZhongEvent);
|
|
|
|
|
|
+ EventManager.Instance.RemoveEventListener(CustomEventType.UpdateZuiZhongEvent, UpdateZuiZhongEvent);
|
|
}
|
|
}
|
|
|
|
|
|
public override void AddButtonEvent()
|
|
public override void AddButtonEvent()
|
|
{
|
|
{
|
|
base.AddButtonEvent();
|
|
base.AddButtonEvent();
|
|
Btn_RemoveEvent.onClick.AddListener(() => { EventSystemManager.Instance.RemoveEvent(eventList); });
|
|
Btn_RemoveEvent.onClick.AddListener(() => { EventSystemManager.Instance.RemoveEvent(eventList); });
|
|
- Btn_Go.onClick.AddListener(() =>
|
|
|
|
- {
|
|
|
|
- goCallBack?.Invoke(this);
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
|
|
+ Btn_Go.onClick.AddListener(() => { goCallBack?.Invoke(this); });
|
|
|
|
+
|
|
Btn_ZuiZhong.onClick.AddListener(() =>
|
|
Btn_ZuiZhong.onClick.AddListener(() =>
|
|
{
|
|
{
|
|
AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList = eventList;
|
|
AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList = eventList;
|
|
-
|
|
|
|
- EventManager.Instance.Dispatch(CustomEventType.UpdateZuiZhongEvent,null);
|
|
|
|
|
|
+
|
|
|
|
+ EventManager.Instance.Dispatch(CustomEventType.UpdateZuiZhongEvent, null);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -61,10 +57,11 @@ namespace Fort23.Mono
|
|
{
|
|
{
|
|
// if(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid == eventList.guid)
|
|
// if(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid == eventList.guid)
|
|
Btn_ZuiZhong.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid != eventList.guid);
|
|
Btn_ZuiZhong.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid != eventList.guid);
|
|
-
|
|
|
|
|
|
+
|
|
ZuiZhongRoot.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid == eventList.guid);
|
|
ZuiZhongRoot.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid == eventList.guid);
|
|
}
|
|
}
|
|
- public async void CustomInit(AccountFileInfo.EventList eventList,Action<ItemWidgetBasic> goCallBack)
|
|
|
|
|
|
+
|
|
|
|
+ public async void CustomInit(AccountFileInfo.EventList eventList, Action<ItemWidgetBasic> goCallBack)
|
|
{
|
|
{
|
|
this.eventList = eventList;
|
|
this.eventList = eventList;
|
|
this.goCallBack = goCallBack;
|
|
this.goCallBack = goCallBack;
|
|
@@ -80,7 +77,14 @@ namespace Fort23.Mono
|
|
|
|
|
|
if (eventLinkData == null || eventLinkData.eventConditions == null || eventLinkData.eventConditions.Count == 0)
|
|
if (eventLinkData == null || eventLinkData.eventConditions == null || eventLinkData.eventConditions.Count == 0)
|
|
{
|
|
{
|
|
- Text_Eventcondition.text = LanguageManager.Instance.Text(evenkConfig.EventConditionMessage);
|
|
|
|
|
|
+ if (evenkConfig.EventConditionMessage != 0)
|
|
|
|
+ {
|
|
|
|
+ Text_Eventcondition.text = LanguageManager.Instance.Text(evenkConfig.EventConditionMessage);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Text_Eventcondition.text = "";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -92,9 +96,9 @@ namespace Fort23.Mono
|
|
|
|
|
|
Text_Eventcondition.text = desc;
|
|
Text_Eventcondition.text = desc;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
Btn_ZuiZhong.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid != eventList.guid);
|
|
Btn_ZuiZhong.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid != eventList.guid);
|
|
-
|
|
|
|
|
|
+
|
|
ZuiZhongRoot.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid == eventList.guid);
|
|
ZuiZhongRoot.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventList.guid == eventList.guid);
|
|
Icon_Marsk.gameObject.SetActive(eventList.isCompleted);
|
|
Icon_Marsk.gameObject.SetActive(eventList.isCompleted);
|
|
|
|
|