mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
fix
This commit is contained in:
parent
ac8bbf2d73
commit
ea311afba2
@ -620,7 +620,7 @@ namespace DCFApixels.DragonECS
|
||||
// Поэтому исключающее ограничение игнорируется для maxEntites.
|
||||
return maxEntites;
|
||||
}
|
||||
private unsafe bool TryFindEntityStorage(out IEntityStorage storage)
|
||||
private unsafe bool TryGetEntityStorage(out IEntityStorage storage)
|
||||
{
|
||||
if (_isHasAnyEntityStorage)
|
||||
{
|
||||
@ -746,7 +746,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
return new Enumerator(_span.Slice(0, 0), _iterator);
|
||||
}
|
||||
if (_iterator.TryFindEntityStorage(out IEntityStorage storage))
|
||||
if (_span.IsSourceEntities && _iterator.TryGetEntityStorage(out IEntityStorage storage))
|
||||
{
|
||||
return new Enumerator(storage.ToSpan(), _iterator);
|
||||
}
|
||||
@ -886,7 +886,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
return new Enumerator(_span.Slice(0, 0), _iterator);
|
||||
}
|
||||
if (_iterator.TryFindEntityStorage(out IEntityStorage storage))
|
||||
if (_span.IsSourceEntities && _iterator.TryGetEntityStorage(out IEntityStorage storage))
|
||||
{
|
||||
return new Enumerator(storage.ToSpan(), _iterator);
|
||||
}
|
||||
|
@ -133,11 +133,7 @@ namespace DCFApixels.DragonECS
|
||||
public EcsSpan Entities
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReleaseDelEntityBufferAll();
|
||||
return GetCurrentEntities_Internal();
|
||||
}
|
||||
get { return ToSpan(); }
|
||||
}
|
||||
public int PoolsCount
|
||||
{
|
||||
@ -459,7 +455,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
ReleaseDelEntityBufferAll();
|
||||
}
|
||||
return _entityDispenser.UsedToEcsSpan(ID);
|
||||
return GetCurrentEntities_Internal();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public unsafe entlong GetEntityLong(int entityID)
|
||||
|
Loading…
Reference in New Issue
Block a user