新增角色相关信息

This commit is contained in:
2025-07-28 23:45:46 +08:00
parent be33e12b35
commit 09bbae66d2
68 changed files with 452 additions and 662 deletions

View File

@@ -0,0 +1,30 @@
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
namespace NB.Game;
public sealed class Player : Entity
{
public long CreateTime;
public long LoginTime;
public PlayerBasic Basic = new PlayerBasic();
public PlayerStatistics Statistics = new PlayerStatistics();
public PlayerDayFlags DayFlags = new PlayerDayFlags();
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
public Dictionary<int, int> Currency = new();
[BsonIgnore] public long SessionRunTimeId;
/// <summary>
/// 需要保存数据库
/// </summary>
[BsonIgnore] public bool NeedSave;
/// <summary>
/// 最后保存时间
/// </summary>
[BsonIgnore] public long LastSaveTime;
}