Traveller/scripts/map/room/RoomFactory.cs
2024-04-28 21:55:19 +08:00

26 lines
659 B
C#

using ColdMint.scripts.map.interfaces;
using Godot;
namespace ColdMint.scripts.map.room;
/// <summary>
/// <para>The room template factory is used to generate room templates</para>
/// <para>房间模板工厂用于生成房间模板</para>
/// </summary>
public static class RoomFactory
{
/// <summary>
/// <para>CreateRoom</para>
/// <para>创建房间模板</para>
/// </summary>
/// <param name="resPath"></param>
/// <returns></returns>
public static IRoom CreateRoom(string resPath)
{
var room = new Room
{
RoomScene = GD.Load<PackedScene>(resPath)
};
return room;
}
}