mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-11-13 17:15:54 +08:00
add check mask methods
This commit is contained in:
parent
57f07f8c2d
commit
2e0765626e
@ -36,6 +36,10 @@ namespace DCFApixels.DragonECS
|
|||||||
public ent GetEntity(int entityID);
|
public ent GetEntity(int entityID);
|
||||||
public void Destroy();
|
public void Destroy();
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
public bool IsMaskCompatible(EcsMask mask, int entity);
|
public bool IsMaskCompatible(EcsMask mask, int entity);
|
||||||
public bool IsMaskCompatibleWithout(EcsMask mask, int entity, int otherPoolID);
|
public bool IsMaskCompatibleWithout(EcsMask mask, int entity, int otherPoolID);
|
||||||
|
|
||||||
@ -228,6 +232,17 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IsMaskCompatible/IsMaskCompatibleWithout
|
#region IsMaskCompatible/IsMaskCompatibleWithout
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public bool IsMaskCompatible<TInc>(int entityID) where TInc : struct, IInc
|
||||||
|
{
|
||||||
|
return IsMaskCompatible(EcsMaskMap<TArchetype>.GetMask<TInc, Exc>(), entityID);
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public bool IsMaskCompatible<TInc, TExc>(int entityID) where TInc : struct, IInc where TExc : struct, IExc
|
||||||
|
{
|
||||||
|
return IsMaskCompatible(EcsMaskMap<TArchetype>.GetMask<TInc, TExc>(), entityID);
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsMaskCompatible(EcsMask mask, int entity)
|
public bool IsMaskCompatible(EcsMask mask, int entity)
|
||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DRAGONECS_DEBUG) || !DRAGONECS_NO_SANITIZE_CHECKS
|
#if (DEBUG && !DISABLE_DRAGONECS_DEBUG) || !DRAGONECS_NO_SANITIZE_CHECKS
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user