mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
Update entlong.cs
This commit is contained in:
parent
5031853e91
commit
a016763824
@ -212,7 +212,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
if (mask.WorldID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
if (mask.WorldID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
||||||
id = _id;
|
id = _id;
|
||||||
return mask.World.IsAlive(_id, _gen);
|
return mask.World.IsAlive(_id, _gen) && mask.World.IsMatchesMask(mask, _id);
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool TryUnpack(EcsMask mask, out int id, out short gen)
|
public bool TryUnpack(EcsMask mask, out int id, out short gen)
|
||||||
@ -220,14 +220,14 @@ namespace DCFApixels.DragonECS
|
|||||||
if (mask.WorldID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
if (mask.WorldID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
||||||
gen = _gen;
|
gen = _gen;
|
||||||
id = _id;
|
id = _id;
|
||||||
return mask.World.IsAlive(_id, _gen);
|
return mask.World.IsAlive(_id, _gen) && mask.World.IsMatchesMask(mask, _id);
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool TryUnpack(EcsAspect aspect, out int id)
|
public bool TryUnpack(EcsAspect aspect, out int id)
|
||||||
{
|
{
|
||||||
if (aspect.World.ID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
if (aspect.World.ID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
||||||
id = _id;
|
id = _id;
|
||||||
return aspect.World.IsAlive(_id, _gen);
|
return aspect.World.IsAlive(_id, _gen) && aspect.IsMatches(_id);
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool TryUnpack(EcsAspect aspect, out int id, out short gen)
|
public bool TryUnpack(EcsAspect aspect, out int id, out short gen)
|
||||||
@ -235,7 +235,7 @@ namespace DCFApixels.DragonECS
|
|||||||
if (aspect.World.ID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
if (aspect.World.ID != _world) { Throw.ArgumentDifferentWorldsException(); }
|
||||||
gen = _gen;
|
gen = _gen;
|
||||||
id = _id;
|
id = _id;
|
||||||
return aspect.World.IsAlive(_id, _gen);
|
return aspect.World.IsAlive(_id, _gen) && aspect.IsMatches(_id);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user