提交进入地图和创建房间相关逻辑和协议
This commit is contained in:
20
Hotfix/Map/Helper/MapFactory.cs
Normal file
20
Hotfix/Map/Helper/MapFactory.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Fantasy;
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Map;
|
||||
|
||||
public class MapFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建一个地图
|
||||
/// </summary>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="mapId"></param>
|
||||
/// <returns></returns>
|
||||
public static Map? Create(Scene scene, int mapId)
|
||||
{
|
||||
var map = Entity.Create<Map>(scene, true, true);
|
||||
map.MapId = mapId;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user