Traveller/scripts/map/LayoutParsingStrategy/ILayoutParsingStrategy.cs
Cold-Mint 544c5303f3
Fixed an issue where the return path of the room template set was invalid, the initial room placement was extracted separately from the new method and added to the seed of map generation.
修复房间模板集返回路径无效的问题,初始房间的放置被单独提取出新的方法,加入地图生成时的种子。
2024-05-21 22:50:33 +08:00

46 lines
1.4 KiB
C#

using System.Threading.Tasks;
using ColdMint.scripts.levelGraphEditor;
namespace ColdMint.scripts.map.LayoutParsingStrategy;
/// <summary>
/// <para>Layout parsing strategy</para>
/// <para>布局图解析策略</para>
/// </summary>
public interface ILayoutParsingStrategy
{
/// <summary>
/// <para>Sets the layout diagram to parse</para>
/// <para>设置要解析的布局图</para>
/// </summary>
/// <param name="levelGraphEditorSaveData"></param>
public void SetLevelGraph(LevelGraphEditorSaveData levelGraphEditorSaveData);
/// <summary>
/// <para>Gets data for the start room node</para>
/// <para>获取起始房间节点的数据</para>
/// </summary>
/// <returns></returns>
public Task<RoomNodeData?> GetStartRoomNodeData();
/// <summary>
/// <para>Gets the next room to place</para>
/// <para>获取下一个要放置的房间</para>
/// </summary>
/// <returns></returns>
public Task<RoomNodeData?> Next();
/// <summary>
/// <para>Gets the ID of the next parent node to place</para>
/// <para>获取下一个要放置的父节点ID</para>
/// </summary>
/// <returns></returns>
public Task<string?> GetNextParentNodeId();
/// <summary>
/// <para>Is there another room that needs to be placed</para>
/// <para>是否还有下一个需要放置的房间</para>
/// </summary>
/// <returns></returns>
public Task<bool> HasNext();
}