mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
Merge branch 'dev' into next_version
This commit is contained in:
commit
5c80c13924
@ -185,7 +185,7 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
public bool IsCollidingID(string id)
|
||||
{
|
||||
if(_collidingIDs== null)
|
||||
if (_collidingIDs == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
for (int i = _emptyEntitiesCount - 1; i >= 0; i--)
|
||||
{
|
||||
if(_emptyEntities[i] == entityID)
|
||||
if (_emptyEntities[i] == entityID)
|
||||
{
|
||||
_emptyEntities[i] = _emptyEntities[--_emptyEntitiesCount];
|
||||
return true;
|
||||
@ -852,7 +852,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
_emptyEntitiesCount = 0;
|
||||
|
||||
if(count < 0)
|
||||
if (count < 0)
|
||||
{
|
||||
count = _delEntBufferCount;
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ namespace DCFApixels.DragonECS
|
||||
slot.count++;
|
||||
slot.version++;
|
||||
var count = _entities[entityID].componentsCount++;
|
||||
if(count == 0 && IsUsed(entityID))
|
||||
if (count == 0 && IsUsed(entityID))
|
||||
{
|
||||
RemoveFromEmptyEntities(entityID);
|
||||
}
|
||||
|
@ -45,10 +45,15 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool TryGetWorld(short worldID, out EcsWorld world)
|
||||
{// ts
|
||||
if (worldID >= _worlds.Length)
|
||||
{
|
||||
world = null;
|
||||
return false;
|
||||
}
|
||||
world = _worlds[worldID];
|
||||
return
|
||||
world != null &&
|
||||
world.IsDestroyed != false &&
|
||||
world.IsDestroyed == false &&
|
||||
worldID != 0;
|
||||
}
|
||||
|
||||
|
@ -69,19 +69,19 @@ namespace DCFApixels.DragonECS.Internal
|
||||
_version++;
|
||||
_iterator.IterateTo(World.Entities, _filteredAllGroup);
|
||||
#if DEBUG && DRAGONECS_DEEP_DEBUG
|
||||
if(_filteredGroup == null)
|
||||
if (_filteredGroup == null)
|
||||
{
|
||||
_filteredGroup = EcsGroup.New(World);
|
||||
}
|
||||
_filteredGroup.Clear();
|
||||
foreach (var e in World.Entities)
|
||||
{
|
||||
if(World.IsMatchesMask(Mask, e))
|
||||
if (World.IsMatchesMask(Mask, e))
|
||||
{
|
||||
_filteredGroup.Add(e);
|
||||
}
|
||||
}
|
||||
if(_filteredAllGroup.SetEquals(_filteredGroup) == false)
|
||||
if (_filteredAllGroup.SetEquals(_filteredGroup) == false)
|
||||
{
|
||||
throw new System.InvalidOperationException();
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ namespace DCFApixels.DragonECS.Internal
|
||||
state ^= state >> 17;
|
||||
state ^= state << 5;
|
||||
return state;
|
||||
};
|
||||
}
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static long NextXorShiftState(long state)
|
||||
|
@ -590,7 +590,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void RemoveListener(IEcsPoolEventListener listener) { _pool.AddListener(listener); }
|
||||
#endif
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Convertors
|
||||
public static implicit operator ReadonlyEcsPool<T>(EcsPool<T> a) { return new ReadonlyEcsPool<T>(a); }
|
||||
|
@ -464,6 +464,8 @@ namespace DCFApixels.DragonECS
|
||||
a.gen != b.gen ||
|
||||
a.world != b.world;
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static explicit operator EntitySlotInfo(entlong a) { return new EntitySlotInfo(a._full); }
|
||||
#endregion
|
||||
|
||||
#region Other
|
||||
|
Loading…
Reference in New Issue
Block a user