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