mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
simple renaming & refactoring
This commit is contained in:
parent
0356302d90
commit
5fac3fd97c
@ -29,7 +29,7 @@ namespace DCFApixels.DragonECS
|
|||||||
public int WorldID
|
public int WorldID
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
get => _source.World.id;
|
get => _source.WorldID;
|
||||||
}
|
}
|
||||||
public EcsWorld World
|
public EcsWorld World
|
||||||
{
|
{
|
||||||
@ -106,17 +106,18 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool IsSubsetOf(EcsReadonlyGroup group) => _source.IsSubsetOf(group._source);
|
public bool IsSubsetOf(EcsReadonlyGroup group) => _source.IsSubsetOf(group._source);
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool IsSubsetOf(EcsGroup group) => _source.IsSubsetOf(group);
|
public bool IsSubsetOf(EcsGroup group) => _source.IsSubsetOf(group);
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool IsSupersetOf(EcsReadonlyGroup group) => _source.IsSupersetOf(group._source);
|
public bool IsSupersetOf(EcsReadonlyGroup group) => _source.IsSupersetOf(group._source);
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool IsSupersetOf(EcsGroup group) => _source.IsSupersetOf(group);
|
public bool IsSupersetOf(EcsGroup group) => _source.IsSupersetOf(group);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal
|
#region Internal
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
internal EcsGroup GetGroupInternal() => _source;
|
internal EcsGroup GetSource_Internal() => _source;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other
|
#region Other
|
||||||
@ -293,7 +294,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
#region CopyFrom/Clone/Bake/ToSpan
|
#region CopyFrom/Clone/Bake/ToSpan
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void CopyFrom(EcsReadonlyGroup group) => CopyFrom(group.GetGroupInternal());
|
public void CopyFrom(EcsReadonlyGroup group) => CopyFrom(group.GetSource_Internal());
|
||||||
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
|
||||||
@ -347,7 +348,7 @@ namespace DCFApixels.DragonECS
|
|||||||
#region UnionWith
|
#region UnionWith
|
||||||
/// <summary>as Union sets</summary>
|
/// <summary>as Union sets</summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void UnionWith(EcsReadonlyGroup group) => UnionWith(group.GetGroupInternal());
|
public void UnionWith(EcsReadonlyGroup group) => UnionWith(group.GetSource_Internal());
|
||||||
/// <summary>as Union sets</summary>
|
/// <summary>as Union sets</summary>
|
||||||
public void UnionWith(EcsGroup group)
|
public void UnionWith(EcsGroup group)
|
||||||
{
|
{
|
||||||
@ -374,7 +375,7 @@ namespace DCFApixels.DragonECS
|
|||||||
#region ExceptWith
|
#region ExceptWith
|
||||||
/// <summary>as Except sets</summary>
|
/// <summary>as Except sets</summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void ExceptWith(EcsReadonlyGroup group) => ExceptWith(group.GetGroupInternal());
|
public void ExceptWith(EcsReadonlyGroup group) => ExceptWith(group.GetSource_Internal());
|
||||||
/// <summary>as Except sets</summary>
|
/// <summary>as Except sets</summary>
|
||||||
public void ExceptWith(EcsGroup group)
|
public void ExceptWith(EcsGroup group)
|
||||||
{
|
{
|
||||||
@ -432,7 +433,7 @@ namespace DCFApixels.DragonECS
|
|||||||
#region IntersectWith
|
#region IntersectWith
|
||||||
/// <summary>as Intersect sets</summary>
|
/// <summary>as Intersect sets</summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void IntersectWith(EcsReadonlyGroup group) => IntersectWith(group.GetGroupInternal());
|
public void IntersectWith(EcsReadonlyGroup group) => IntersectWith(group.GetSource_Internal());
|
||||||
/// <summary>as Intersect sets</summary>
|
/// <summary>as Intersect sets</summary>
|
||||||
public void IntersectWith(EcsGroup group)
|
public void IntersectWith(EcsGroup group)
|
||||||
{
|
{
|
||||||
@ -451,7 +452,7 @@ namespace DCFApixels.DragonECS
|
|||||||
#region SymmetricExceptWith
|
#region SymmetricExceptWith
|
||||||
/// <summary>as Symmetric Except sets</summary>
|
/// <summary>as Symmetric Except sets</summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void SymmetricExceptWith(EcsReadonlyGroup group) => SymmetricExceptWith(group.GetGroupInternal());
|
public void SymmetricExceptWith(EcsReadonlyGroup group) => SymmetricExceptWith(group.GetSource_Internal());
|
||||||
/// <summary>as Symmetric Except sets</summary>
|
/// <summary>as Symmetric Except sets</summary>
|
||||||
public void SymmetricExceptWith(EcsGroup group)
|
public void SymmetricExceptWith(EcsGroup group)
|
||||||
{
|
{
|
||||||
@ -479,7 +480,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
#region SetEquals
|
#region SetEquals
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool SetEquals(EcsReadonlyGroup group) => SetEquals(group.GetGroupInternal());
|
public bool SetEquals(EcsReadonlyGroup group) => SetEquals(group.GetSource_Internal());
|
||||||
public bool SetEquals(EcsGroup group)
|
public bool SetEquals(EcsGroup group)
|
||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
@ -508,7 +509,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
#region Overlaps
|
#region Overlaps
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool Overlaps(EcsReadonlyGroup group) => Overlaps(group.GetGroupInternal());
|
public bool Overlaps(EcsReadonlyGroup group) => Overlaps(group.GetSource_Internal());
|
||||||
public bool Overlaps(EcsGroup group)
|
public bool Overlaps(EcsGroup group)
|
||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
@ -542,7 +543,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
#region IsSubsetOf
|
#region IsSubsetOf
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool IsSubsetOf(EcsReadonlyGroup group) => IsSubsetOf(group.GetGroupInternal());
|
public bool IsSubsetOf(EcsReadonlyGroup group) => IsSubsetOf(group.GetSource_Internal());
|
||||||
public bool IsSubsetOf(EcsGroup group)
|
public bool IsSubsetOf(EcsGroup group)
|
||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
@ -559,7 +560,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
#region IsSupersetOf
|
#region IsSupersetOf
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public bool IsSupersetOf(EcsReadonlyGroup group) => IsSupersetOf(group.GetGroupInternal());
|
public bool IsSupersetOf(EcsReadonlyGroup group) => IsSupersetOf(group.GetSource_Internal());
|
||||||
public bool IsSupersetOf(EcsGroup group)
|
public bool IsSupersetOf(EcsGroup group)
|
||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
@ -764,7 +765,7 @@ namespace DCFApixels.DragonECS
|
|||||||
public int CapacitySparce => _group.CapacitySparce;
|
public int CapacitySparce => _group.CapacitySparce;
|
||||||
public override string ToString() => _group.ToString();
|
public override string ToString() => _group.ToString();
|
||||||
public DebuggerProxy(EcsGroup group) => _group = group;
|
public DebuggerProxy(EcsGroup group) => _group = group;
|
||||||
public DebuggerProxy(EcsReadonlyGroup group) : this(group.GetGroupInternal()) { }
|
public DebuggerProxy(EcsReadonlyGroup group) : this(group.GetSource_Internal()) { }
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ namespace DCFApixels.DragonECS
|
|||||||
private static IdDispenser _worldIdDispenser = new IdDispenser(0);
|
private static IdDispenser _worldIdDispenser = new IdDispenser(0);
|
||||||
|
|
||||||
private static List<DataReleaser> _dataReleaseres = new List<DataReleaser>();
|
private static List<DataReleaser> _dataReleaseres = new List<DataReleaser>();
|
||||||
|
//public static int Copacity => Worlds.Length;
|
||||||
|
|
||||||
static EcsWorld()
|
static EcsWorld()
|
||||||
{
|
{
|
||||||
@ -41,7 +42,7 @@ namespace DCFApixels.DragonECS
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static ref T GetData<T>(int worldID) => ref WorldComponentPool<T>.GetForWorld(worldID);
|
public static ref T GetData<T>(int worldID) => ref WorldComponentPool<T>.GetForWorld(worldID);
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static ref T UncheckedGetData<T>(int worldID) => ref WorldComponentPool<T>.GetForWorldUnchecked(worldID);
|
public static ref T GetDataUnchecked<T>(int worldID) => ref WorldComponentPool<T>.GetForWorldUnchecked(worldID);
|
||||||
|
|
||||||
private abstract class DataReleaser
|
private abstract class DataReleaser
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user