mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
stash
This commit is contained in:
parent
ab444859d3
commit
50691b3309
@ -443,7 +443,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
try
|
||||
{
|
||||
translationCallback(pair.run, t0);
|
||||
translationCallback(pair.run, ref data);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -456,7 +456,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
if (pair.runFinally != null)
|
||||
{
|
||||
translationFinnalyCallback(pair.runFinally, t0);
|
||||
translationFinnalyCallback(pair.runFinally, ref data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -303,13 +303,17 @@ namespace DCFApixels.DragonECS
|
||||
Get(entityID) = dataRaw == null ? default : (T)dataRaw;
|
||||
}
|
||||
|
||||
#if DRAGONECS_DEEP_DEBUG
|
||||
private bool _lockToSpan = false;
|
||||
#endif
|
||||
public EcsSpan ToSpan()
|
||||
{
|
||||
#if DRAGONECS_DEEP_DEBUG
|
||||
if (_lockToSpan)
|
||||
{
|
||||
return _source.Entities;
|
||||
}
|
||||
#endif
|
||||
UpdateDenseEntities();
|
||||
var span = new EcsSpan(_source.ID, _denseEntitiesDelayed, 1, _itemsCount);
|
||||
#if DRAGONECS_DEEP_DEBUG
|
||||
@ -326,7 +330,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
private void UpdateDenseEntities()
|
||||
{
|
||||
//if (IsDenseEntitiesDelayedValid()) { return; }
|
||||
if (IsDenseEntitiesDelayedValid()) { return; }
|
||||
_denseEntitiesDelayedCount = 0;
|
||||
for (int i = 0, jRight = _itemsCount + 1; i < _capacity; i++)
|
||||
{
|
||||
@ -378,7 +382,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
private int GetFreeItemIndex(int entityID)
|
||||
{
|
||||
//if (_denseEntitiesDelayedCount >= _capacity - 1)
|
||||
if (_denseEntitiesDelayedCount >= _capacity - 1)
|
||||
{
|
||||
UpdateDenseEntities();
|
||||
}
|
||||
@ -413,9 +417,10 @@ namespace DCFApixels.DragonECS
|
||||
_denseEntitiesDelayed = new int[newSize];
|
||||
_denseEntitiesDelayedCount = 0;
|
||||
_capacity = newSize;
|
||||
_isDenseEntitiesDelayedValid = false;
|
||||
UpdateDenseEntities();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Listeners
|
||||
#if !DISABLE_POOLS_EVENTS
|
||||
@ -434,7 +439,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Enable/Disable/Copy
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
Loading…
Reference in New Issue
Block a user