mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-21 19:49:34 +08:00

* 添加 SQL 文件 * 完善库存的显示;从用户类中移除余额;使用 Guid 关联物品与其技能;取消特效类的伤害乘区,改为加算 * 升级 .NET 9 * 回合数在获取到下一个角色时累加 * 更新 .NET9 的工作流
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Milimoe.FunGame.Core.Entity;
|
|
using Milimoe.FunGame.Core.Interface.Base;
|
|
using Milimoe.FunGame.Core.Library.Constant;
|
|
|
|
namespace Milimoe.FunGame.Core.Api.EntityFactory
|
|
{
|
|
internal class UserFactory : IFactory<User>
|
|
{
|
|
public Type EntityType => typeof(User);
|
|
|
|
public User Create()
|
|
{
|
|
return General.UnknownUserInstance;
|
|
}
|
|
|
|
public static User Create(long Id = 0, string Username = "", DateTime? RegTime = null, DateTime? LastTime = null, string Email = "", string NickName = "", bool IsAdmin = false, bool IsOperator = false, bool IsEnable = true, double GameTime = 0, string AutoKey = "")
|
|
{
|
|
return new(Id, Username, RegTime, LastTime, Email, NickName, IsAdmin, IsOperator, IsEnable, GameTime, AutoKey);
|
|
}
|
|
|
|
public static User Create(UserType type)
|
|
{
|
|
return new(type);
|
|
}
|
|
|
|
public static User CreateGuest()
|
|
{
|
|
return General.GuestUserInstance;
|
|
}
|
|
|
|
public static User CreateLocalUser()
|
|
{
|
|
return General.LocalUserInstance;
|
|
}
|
|
}
|
|
}
|