2023-04-06 11:50:31 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DCFApixels.DragonECS
|
|
|
|
|
|
{
|
2023-04-06 23:40:47 +08:00
|
|
|
|
public interface IEcsReadonlyTable
|
2023-04-06 11:50:31 +08:00
|
|
|
|
{
|
|
|
|
|
|
#region Properties
|
2023-04-06 23:40:47 +08:00
|
|
|
|
/// <summary>Table Archetype</summary>
|
2023-04-06 11:50:31 +08:00
|
|
|
|
public Type ArchetypeType { get; }
|
2023-04-07 19:23:07 +08:00
|
|
|
|
internal int Count { get; }
|
|
|
|
|
|
internal int Capacity { get; }
|
2023-04-06 11:50:31 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2023-04-06 23:40:47 +08:00
|
|
|
|
#region Methods
|
2023-04-06 11:50:31 +08:00
|
|
|
|
public ReadOnlySpan<IEcsPool> GetAllPools();
|
2023-04-06 23:40:47 +08:00
|
|
|
|
public int GetComponentID<T>();
|
2023-04-06 11:50:31 +08:00
|
|
|
|
|
|
|
|
|
|
public EcsPool<T> GetPool<T>() where T : struct;
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsMaskCompatible<TInc>(int entity) where TInc : struct, IInc;
|
|
|
|
|
|
public bool IsMaskCompatible<TInc, TExc>(int entity) where TInc : struct, IInc where TExc : struct, IExc;
|
2023-04-07 18:16:13 +08:00
|
|
|
|
public bool IsMaskCompatible(EcsComponentMask mask, int entity);
|
|
|
|
|
|
public bool IsMaskCompatibleWithout(EcsComponentMask mask, int entity, int otherPoolID);
|
2023-04-06 23:40:47 +08:00
|
|
|
|
#endregion
|
2023-04-06 11:50:31 +08:00
|
|
|
|
|
2023-04-06 23:40:47 +08:00
|
|
|
|
#region Internal Methods
|
2023-04-06 11:50:31 +08:00
|
|
|
|
internal void OnEntityComponentAdded(int entityID, int changedPoolID);
|
|
|
|
|
|
internal void OnEntityComponentRemoved(int entityID, int changedPoolID);
|
|
|
|
|
|
internal void RegisterGroup(EcsGroup group);
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|