mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 01:07:14 +08:00
(client) feat:添加测试用定义
This commit is contained in:
committed by
TheRedApricot
parent
3df2a3ee2c
commit
21c49ac96b
@@ -15,12 +15,29 @@ namespace Managers
|
||||
|
||||
public void Init()
|
||||
{
|
||||
var packFolder = Directory.GetDirectories(dataSetFilePath[0]);
|
||||
var packFolder = Configs.ConfigProcessor.GetSubFolders(new(dataSetFilePath));
|
||||
foreach (var folder in packFolder)
|
||||
{
|
||||
var pack = new DefinePack();
|
||||
if (pack.LoadPack(folder)) packs.Add(pack.packID, pack);
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (packs == null || packs.Count == 0)
|
||||
{
|
||||
return "No packs available"; // 如果集合为空或为 null,返回默认信息
|
||||
}
|
||||
|
||||
var result = new System.Text.StringBuilder();
|
||||
|
||||
foreach (var definePack in packs)
|
||||
{
|
||||
result.AppendLine(definePack.ToString()); // 每个元素占一行
|
||||
}
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user