using Arch.Core; namespace GFramework.Core.Abstractions.ecs; /// /// ECS世界接口,封装Arch的World实例 /// public interface IEcsWorld : IDisposable { /// /// 当前实体数量 /// int EntityCount { get; } /// /// 获取内部的Arch World实例(用于高级操作) /// World InternalWorld { get; } /// /// 创建一个新实体 /// /// 组件类型数组 /// 创建的实体 Entity CreateEntity(params ComponentType[] types); /// /// 销毁指定实体 /// /// 要销毁的实体 void DestroyEntity(Entity entity); /// /// 检查实体是否存活 /// /// 要检查的实体 /// 实体是否存活 bool IsAlive(Entity entity); /// /// 清空所有实体 /// void Clear(); }