[修复]1. 修复UI包变动的接口兼容

This commit is contained in:
Blank 2024-11-12 15:59:04 +08:00
parent 99eb639c27
commit 2d5fb4e7f3
6 changed files with 8 additions and 16 deletions

View File

@ -18,7 +18,7 @@ namespace Hotfix.UI
public static string serverIp = "127.0.0.1";
public static int serverPort = 29100;
protected override void OnOpen(object userData)
public override void OnOpen(object userData)
{
m_enter.onClick.Add(OnLoginClick);
base.OnOpen(userData);
@ -84,7 +84,7 @@ namespace Hotfix.UI
}
await GameApp.UI.OpenUIFormAsync<UIMain>(Utility.Asset.Path.GetUIPath(FUIPackage.UIMain), UIGroupConstants.Floor.Name);
GameApp.UI.CloseUIForm(UIForm);
GameApp.UI.CloseUIForm(this);
}
private static void OnNetworkClosed(object sender, GameEventArgs e)

View File

@ -10,7 +10,7 @@ namespace Hotfix.UI
{
ReqPlayerCreate req;
protected override void OnOpen(object userData)
public override void OnOpen(object userData)
{
req = new ReqPlayerCreate();
base.OnOpen(userData);
@ -36,7 +36,7 @@ namespace Hotfix.UI
}
await GameApp.UI.OpenUIFormAsync<UIPlayerList>( Utility.Asset.Path.GetUIPackagePath(FUIPackage.UILogin),UIGroupConstants.Floor.Name, UserData);
GameApp.UI.CloseUIForm(UIForm);
GameApp.UI.CloseUIForm(this);
}
}
}

View File

@ -11,7 +11,7 @@ namespace Hotfix.UI
{
List<PlayerInfo> playerList = new List<PlayerInfo>();
protected override async void OnOpen(object userData)
public override async void OnOpen(object userData)
{
base.OnOpen(userData);
@ -37,7 +37,7 @@ namespace Hotfix.UI
var respPlayerLogin = await GameApp.Network.GetNetworkChannel("network").Call<RespPlayerLogin>(reqPlayerLogin);
PlayerManager.Instance.PlayerInfo = respPlayerLogin.PlayerInfo;
await GameApp.UI.OpenUIFormAsync<UIMain>(Utility.Asset.Path.GetUIPackagePath(FUIPackage.UIMain), UIGroupConstants.Floor.Name);
GameApp.UI.CloseUIForm(UIForm);
GameApp.UI.CloseUIForm(this);
}
PlayerInfo m_SelectedPlayerInfo;

View File

@ -7,7 +7,7 @@ namespace Hotfix.UI
{
public partial class UIMain
{
protected override void OnOpen(object userData)
public override void OnOpen(object userData)
{
base.OnOpen(userData);

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 4a4894697d01dc244931e0cf3df13b4c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -18,7 +18,7 @@ namespace Unity.Startup.Procedure
public static void Dispose()
{
GameApp.UI.CloseUIForm(_ui.UIForm);
GameApp.UI.CloseUIForm<UILauncher>();
_ui = null;
}