using System; using XGame.Database; using XGame.Framework; using XGame.Framework.Data; namespace FL.Data { public class PlayerData : DataSingleton, IDisposable { public int chapterId = 10010101; public int[] skillIds = new int[] { 10011 };//13521;200705 , public long UID { get; set; } public string Name { get; set; } private Attributes _attr; public Attributes Attr => _attr ??= ObjectPool.Acquire(); public string MapAssetName { get { var chapter = ChapterTableRepo.Get(chapterId); var map = MapTableRepo.Get(chapter.Map); return map.AssetName; } } /// /// 角色等级 /// public int Level { get; set; } /// /// 当前经验值 /// public long Exp { get; set; } /// /// 角色称号 /// public string Title { get; set; } void IDisposable.Dispose() { if (_attr != null) { ObjectPool.Recycle(_attr); _attr = null; } } } }