Files
Fishing2/Assets/Scripts/UI/Login/LoginPanel.cs
2026-02-05 00:02:33 +08:00

47 lines
1.0 KiB
C#

// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using FairyGUI;
using Fantasy.Async;
using UnityEngine;
using NBC;
using Fantasy.Entitas;
using NBF.Fishing2;
using UnityEngine.InputSystem;
using UIPanel = NBC.UIPanel;
namespace NBF
{
public partial class LoginPanel : UIPanel
{
protected override void OnInit()
{
this.AutoAddClick(OnClick);
}
private void OnClick(GComponent btn)
{
if (btn == BtnLogin)
{
OnLoginClick().Coroutine();
// Debug.LogError("test");
// MessageBox.Show();
}
}
private async FTask OnLoginClick()
{
await LoginHelper.Login(InputAccount.text);
await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
// BagPanel.Show();
// BagSlotPanel.Show();
// SettingPanel.Show();
// HomePanel.Show();
Del();
}
}
}