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()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
foreach (var e in Entities)
|
||||
{
|
||||
if (_componentCounts[e] <= 0)
|
||||
|
@ -142,15 +142,17 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void UnregisterEntityComponent(int entityID, int componentTypeID, EcsMaskChunck maskBit)
|
||||
{
|
||||
// _poolComponentCounts[componentTypeID]--;
|
||||
// var count = --_componentCounts[entityID];
|
||||
// _entitiesComponentMasks[entityID][maskBit.chankIndex] &= ~maskBit.mask;
|
||||
//
|
||||
// if (count == 0 && _allEntites.Has(entityID))
|
||||
// DelEntity(entityID);
|
||||
//#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
// if (count < 0) Throw.World_InvalidIncrementComponentsBalance();
|
||||
//#endif
|
||||
_poolComponentCounts[componentTypeID]--;
|
||||
var count = --_componentCounts[entityID];
|
||||
_entitiesComponentMasks[entityID][maskBit.chankIndex] &= ~maskBit.mask;
|
||||
|
||||
if (count == 0 && IsUsed(entityID))
|
||||
{
|
||||
DelEntity(entityID);
|
||||
}
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (count < 0) Throw.World_InvalidIncrementComponentsBalance();
|
||||
#endif
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private bool HasEntityComponent(int entityID, EcsMaskChunck maskBit)
|
||||
|
Loading…
Reference in New Issue
Block a user