using Fantasy;
using Fantasy.Entitas;
using NB.Map;

namespace NB.Game;

public static class ItemFactory
{
    /// <summary>
    /// 创建一个新的Player
    /// </summary>
    /// <param name="scene"></param>
    /// <param name="configId"></param>
    /// <param name="count"></param>
    /// <returns></returns>
    public static Item Create(Scene scene, uint configId, int count = 1)
    {
        var item = Entity.Create<Item>(scene, true, true);
        item.ConfigId = configId;
        item.Count = count;
        return item;
    }
}