This commit is contained in:
2025-07-27 12:34:04 +08:00
parent 6311c7cb12
commit 743c1d2baa
194 changed files with 81685 additions and 696 deletions

View File

@@ -3,10 +3,8 @@ using MongoDB.Bson.Serialization.Attributes;
namespace NB.Gate;
public sealed class GameAccount : Entity
public sealed class Player : Entity
{
// 1、可以拿ToKen的传递过来的AId来当这个组件的Id.
// 2、让这个Id自动生成、在组件里做一个变量来记录ToKen的AId。 public long AuthenticationId;
public long CreateTime;
public long LoginTime;

View File

@@ -2,12 +2,14 @@ using Fantasy.Entitas;
namespace NB.Gate;
public sealed class GameAccountFlagComponent : Entity
public sealed class PlayerFlagComponent : Entity
{
public bool Kick { get; set; }
public long AccountID;
// 有一种可能当在Account在其他地方被销毁
// 这时候因为这个Account是会回收到池子中所以这个引用还是有效的
// 那这时候就会出现这个引用的Account可能是其他用户的了。
public EntityReference<GameAccount> Account;
public EntityReference<Player> Account;
}

View File

@@ -1,8 +0,0 @@
using Fantasy.Entitas;
namespace NB.Gate;
public sealed class GameAccountManageComponent : Entity
{
public readonly Dictionary<long, GameAccount> Accounts = new();
}

View File

@@ -0,0 +1,8 @@
using Fantasy.Entitas;
namespace NB.Gate;
public sealed class PlayerManageComponent : Entity
{
public readonly Dictionary<long, Player> Players = new();
}