123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using System;
- using Core.Language;
- using Excel2Json;
- using Fort23.Core;
- using Fort23.UTool;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "ShengShiEventWidget")]
- public partial class ShengShiEventWidget : UIComponent
- {
- private AccountFileInfo.EventList eventList;
- private void Init()
- {
- }
- public override void AddEvent()
- {
- }
- public override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- myButton.onClick.AddListener(Button_onClick);
- }
- private void Button_onClick()
- {
- if (EventSystemManager.Instance.isTriggerEvent)
- return;
- UIManager.Instance.DormancyAllGComponent<ShengShiEventWidget>();
- EventSystemManager.Instance.TriggerEvent(eventList);
- }
- private EventConfig randomEventConfig;
- public void InitShengShiEventWidget(AccountFileInfo.EventList eventList)
- {
- this.eventList = eventList;
- randomEventConfig = ConfigComponent.Instance.Get<EventConfig>(eventList.eventID);
- Text_Name.text = LanguageManager.Instance.Text(randomEventConfig.EventName);
- EventLinkConfig conditionConfig = ConfigComponent.Instance.Get<EventLinkConfig>(randomEventConfig.EventLinksId[0]);
- string desc = String.Empty;
- // if (conditionConfig.LanID == null)
- {
- desc = EventHelper.GetTaskMessage(randomEventConfig.EventLinksId[0]);
- }
- // else
- // {
- // desc = LanguageManager.Instance.Text(conditionConfig.LanID[0]);
- // if (desc.Length > 8)
- // {
- // desc = desc.Substring(0, 8);
- // desc += "...";
- // }
- // }
-
- Massge.text = LanguageManager.Instance.Text(desc);
- }
- }
- }
|