using System;
using System.Collections.Generic;
using BITKit.Entities;
using Cysharp.Threading.Tasks;
using UnityEngine;

namespace Project.B.Entities
{
    /// <summary>
    /// 实体工厂
    /// </summary>
    public interface IEntitiesFactory:IDisposable
    {
        IReadOnlyDictionary<int,IEntity> Entities { get; }
        UniTask<IEntity> CreateAsync(string addressablePath,GameObject model);
        public event Func<string, IEntity,UniTask> OnEntityCreate;
        public event Func<string, IEntity,UniTask> OnEntityCreated;
    }
}
