Files
DanhengServer-OpenSource/Common/Data/Excel/RogueMapExcel.cs
2024-04-06 17:31:57 +08:00

39 lines
1016 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EggLink.DanhengServer.Data.Excel
{
[ResourceEntity("RogueMap.json")]
public class RogueMapExcel : ExcelResource
{
public int RogueMapID { get; set; }
public int SiteID { get; set; }
public bool IsStart { get; set; }
public int PosX { get; set; }
public int PosY { get; set; }
public List<int> NextSiteIDList { get; set; } = [];
public List<int> LevelList { get; set; } = [];
public override int GetId()
{
return RogueMapID * 1000 + SiteID;
}
public override void Loaded()
{
if (GameData.RogueMapData.TryGetValue(RogueMapID, out var map))
{
map.Add(SiteID, this);
}
else
{
GameData.RogueMapData.Add(RogueMapID, new() { { SiteID, this } });
}
}
}
}