| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using Core.Language;
- using Excel2Json;
- using Fort23.Core;
- using Fort23.UTool;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "BigPlacesChangeInfoPanel")]
- public partial class BigPlacesChangeInfoPanel : UIPanel
- {
- private TimerEntity timerEntity;
- private void Init()
- {
- }
- protected override void AddEvent()
- {
- }
- protected override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- }
- public override CTask<bool> AsyncInit(object[] uiData)
- {
- timerEntity?.Dispose();
- timerEntity = null;
- int type = int.Parse(uiData[1].ToString());
- int placeId = int.Parse(uiData[0].ToString());
- if (type == 1)
- {
- PlacesConfig placesConfig = ConfigComponent.Instance.Get<PlacesConfig>(placeId);
- Text_PlacesName.text = LanguageManager.Instance.Text(placesConfig.placeName);
- }
- else
- {
- Text_PlacesName.text = "逍遥游";
- }
- timerEntity = TimerComponent.Instance.AddTimer(1500, () => { UIManager.Instance.HideUIUIPanel(this); });
- return base.AsyncInit(uiData);
- }
- public static async CTask<BigPlacesChangeInfoPanel> OpenPanel(int placeId, int type = 1)
- {
- BigPlacesChangeInfoPanel placesChangeInfoPanel =
- await UIManager.Instance.LoadAndOpenPanel<BigPlacesChangeInfoPanel>(null, UILayer.Top,
- uiData: new object[] { placeId, type });
- return placesChangeInfoPanel;
- }
- }
- }
|