mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
restore functionality
This commit is contained in:
parent
d76a699091
commit
d1374d72ca
@ -274,7 +274,6 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
public void DeleteEmptyEntites()
|
public void DeleteEmptyEntites()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
|
||||||
foreach (var e in Entities)
|
foreach (var e in Entities)
|
||||||
{
|
{
|
||||||
if (_componentCounts[e] <= 0)
|
if (_componentCounts[e] <= 0)
|
||||||
|
@ -142,15 +142,17 @@ namespace DCFApixels.DragonECS
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
private void UnregisterEntityComponent(int entityID, int componentTypeID, EcsMaskChunck maskBit)
|
private void UnregisterEntityComponent(int entityID, int componentTypeID, EcsMaskChunck maskBit)
|
||||||
{
|
{
|
||||||
// _poolComponentCounts[componentTypeID]--;
|
_poolComponentCounts[componentTypeID]--;
|
||||||
// var count = --_componentCounts[entityID];
|
var count = --_componentCounts[entityID];
|
||||||
// _entitiesComponentMasks[entityID][maskBit.chankIndex] &= ~maskBit.mask;
|
_entitiesComponentMasks[entityID][maskBit.chankIndex] &= ~maskBit.mask;
|
||||||
//
|
|
||||||
// if (count == 0 && _allEntites.Has(entityID))
|
if (count == 0 && IsUsed(entityID))
|
||||||
// DelEntity(entityID);
|
{
|
||||||
//#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
DelEntity(entityID);
|
||||||
// if (count < 0) Throw.World_InvalidIncrementComponentsBalance();
|
}
|
||||||
//#endif
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
|
if (count < 0) Throw.World_InvalidIncrementComponentsBalance();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
private bool HasEntityComponent(int entityID, EcsMaskChunck maskBit)
|
private bool HasEntityComponent(int entityID, EcsMaskChunck maskBit)
|
||||||
|
Loading…
Reference in New Issue
Block a user