2025-03-19 18:16:39 +08:00

28 lines
986 B
C#

using Fantasy;
using Fantasy.Async;
namespace Hotfix;
public static class AuthenticationHelper
{
public static async FTask<uint> RegisterAccount(Scene scene,string username, string password,string source)
{
return await scene.GetComponent<AuthenticationComponent>().Register(username,password,source);
}
public static async FTask<(uint error,long acountId)> Login(Scene scene,string username, string password,string source)
{
return await scene.GetComponent<AuthenticationComponent>().Login(username,password,source);
}
public static void RemoveCacheAccount(Scene scene, long userCode,bool isDispose = true)
{
scene.GetComponent<AuthenticationComponent>().RemoveRegisterCacheAccount(userCode,isDispose);
}
public static void RemoveCacheAccountInfo(Scene scene, string key,bool isDispose = true)
{
scene.GetComponent<AuthenticationComponent>().RemoveCacheAccountInfo(key,isDispose);
}
}