mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
remove Bake methods
This commit is contained in:
parent
fda8419dbf
commit
b486c26a62
@ -77,10 +77,6 @@ namespace DCFApixels.DragonECS
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public EcsGroup Clone() { return _source.Clone(); }
|
public EcsGroup Clone() { return _source.Clone(); }
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public int Bake(ref int[] entities) { return _source.Bake(ref entities); }
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public void Bake(List<int> entities) { _source.Bake(entities); }
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public EcsSpan Slice(int start) { return _source.Slice(start); }
|
public EcsSpan Slice(int start) { return _source.Slice(start); }
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public EcsSpan Slice(int start, int length) { return _source.Slice(start, length); }
|
public EcsSpan Slice(int start, int length) { return _source.Slice(start, length); }
|
||||||
@ -315,7 +311,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region CopyFrom/Clone/Bake/Slice/ToSpan/ToArray
|
#region CopyFrom/Clone/Slice/ToSpan/ToArray
|
||||||
public void CopyFrom(EcsGroup group)
|
public void CopyFrom(EcsGroup group)
|
||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
@ -355,25 +351,6 @@ namespace DCFApixels.DragonECS
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public int Bake(ref int[] entities)
|
|
||||||
{
|
|
||||||
if (entities.Length < _count)
|
|
||||||
{
|
|
||||||
entities = new int[_count];
|
|
||||||
}
|
|
||||||
Array.Copy(_dense, 1, entities, 0, _count);
|
|
||||||
return _count;
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public void Bake(List<int> entities)
|
|
||||||
{
|
|
||||||
entities.Clear();
|
|
||||||
foreach (var e in this)
|
|
||||||
{
|
|
||||||
entities.Add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public EcsSpan Slice(int start)
|
public EcsSpan Slice(int start)
|
||||||
{
|
{
|
||||||
return Slice(start, _count - start + 1);
|
return Slice(start, _count - start + 1);
|
||||||
|
@ -71,26 +71,7 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Bake/Slice/ToArry
|
#region Slice/ToArry
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public int Bake(ref int[] entities)
|
|
||||||
{
|
|
||||||
if (entities.Length < _values.Length)
|
|
||||||
{
|
|
||||||
Array.Resize(ref entities, _values.Length);
|
|
||||||
}
|
|
||||||
_values.CopyTo(entities);
|
|
||||||
return _values.Length;
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public void Bake(List<int> entities)
|
|
||||||
{
|
|
||||||
entities.Clear();
|
|
||||||
foreach (var e in _values)
|
|
||||||
{
|
|
||||||
entities.Add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public EcsSpan Slice(int start) { return new EcsSpan(_worldID, _values.Slice(start)); }
|
public EcsSpan Slice(int start) { return new EcsSpan(_worldID, _values.Slice(start)); }
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
@ -199,29 +180,6 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
#region Bake/Slice/ToArry
|
#region Bake/Slice/ToArry
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public int Bake(ref entlong[] entities)
|
|
||||||
{
|
|
||||||
EcsWorld world = World;
|
|
||||||
if (entities.Length < _source.Count)
|
|
||||||
{
|
|
||||||
Array.Resize(ref entities, _source.Count);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < _source.Count; i++)
|
|
||||||
{
|
|
||||||
entities[i] = world.GetEntityLong(_source[i]);
|
|
||||||
}
|
|
||||||
return _source.Count;
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public void Bake(List<entlong> entities)
|
|
||||||
{
|
|
||||||
entities.Clear();
|
|
||||||
foreach (var e in this)
|
|
||||||
{
|
|
||||||
entities.Add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
public EcsLongsSpan Slice(int start) { return new EcsLongsSpan(_source.Slice(start)); }
|
public EcsLongsSpan Slice(int start) { return new EcsLongsSpan(_source.Slice(start)); }
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public EcsLongsSpan Slice(int start, int length) { return new EcsLongsSpan(_source.Slice(start, length)); }
|
public EcsLongsSpan Slice(int start, int length) { return new EcsLongsSpan(_source.Slice(start, length)); }
|
||||||
|
Loading…
Reference in New Issue
Block a user