Traveller/scripts/map/room/RoomFactory.cs

26 lines
659 B
C#
Raw Normal View History

2024-04-28 13:55:19 +00:00
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;
}
}