mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
fix
This commit is contained in:
parent
615d201424
commit
2fa250b648
@ -81,6 +81,7 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
public static void ResetStaticState()
|
||||
{
|
||||
var nullworld = _worlds[0];
|
||||
for (int i = 1; i < _worlds.Length; i++)
|
||||
{
|
||||
var world = _worlds[i];
|
||||
@ -92,7 +93,8 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
world = null;
|
||||
}
|
||||
_worlds = Array.Empty<EcsWorld>();
|
||||
_worlds = new EcsWorld[_worldIdDispenser.Capacity];
|
||||
_worlds[0] = nullworld;
|
||||
_worldIdDispenser.ReleaseAll();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace DCFApixels.DragonECS.Internal
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return _usedCount; }
|
||||
}
|
||||
public int Size
|
||||
public int Capacity
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return _size; }
|
||||
@ -339,7 +339,7 @@ namespace DCFApixels.DragonECS.Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
Pair[] result = new Pair[_target.Size];
|
||||
Pair[] result = new Pair[_target.Capacity];
|
||||
for (int i = 0; i < result.Length; i++)
|
||||
{
|
||||
result[i] = new Pair(
|
||||
@ -354,7 +354,7 @@ namespace DCFApixels.DragonECS.Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
ID[] result = new ID[_target.Size];
|
||||
ID[] result = new ID[_target.Capacity];
|
||||
for (int i = 0; i < result.Length; i++)
|
||||
{
|
||||
int id = _target._dense[i];
|
||||
@ -365,7 +365,7 @@ namespace DCFApixels.DragonECS.Internal
|
||||
}
|
||||
public bool IsValid => _target.IsValid();
|
||||
public int Count => _target.Count;
|
||||
public int Size => _target.Size;
|
||||
public int Capacity => _target.Capacity;
|
||||
public int NullID => _target._nullID;
|
||||
internal readonly struct ID
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user