using Fantasy; using Fantasy.Async; using Fantasy.Entitas; using Fantasy.Helper; namespace Hotfix; public static class GameAccountFactory { public static async FTask Create(Scene scene, long accountId, bool isSaveToDatabase = true) { var gameAccount = Entity.Create(scene,accountId,false,false); gameAccount.CreateTime = TimeHelper.Now; if (isSaveToDatabase) { await gameAccount.SaveToDatabase(scene); } return gameAccount; } }