namespace ET.Client { public static class LoginHelper { public static async ETTask Login(Scene root, string account, string password) { root.RemoveComponent(); ClientSenderCompnent clientSenderCompnent = root.AddComponent(); long playerId = await clientSenderCompnent.LoginAsync(account, password); root.GetComponent().MyId = playerId; await EventSystem.Instance.PublishAsync(root, new EventType.LoginFinish()); } } }