mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
rename UncheckedGetPool to GetPoolUnchecked
This commit is contained in:
parent
c6db8d2fc0
commit
910dfb2d51
@ -36,7 +36,7 @@ namespace DCFApixels.DragonECS
|
|||||||
[UnityEngine.Scripting.Preserve]
|
[UnityEngine.Scripting.Preserve]
|
||||||
#endif
|
#endif
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public TPool UncheckedGetPool<TPool>() where TPool : IEcsPoolImplementation, new()
|
public TPool GetPoolUnchecked<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||||
{
|
{
|
||||||
return UncheckedGet<PoolCache<TPool>>().instance;
|
return UncheckedGet<PoolCache<TPool>>().instance;
|
||||||
}
|
}
|
||||||
|
@ -235,9 +235,9 @@ namespace DCFApixels.DragonECS
|
|||||||
return self.GetPool<EcsHybridPool<T>>();
|
return self.GetPool<EcsHybridPool<T>>();
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static EcsHybridPool<T> UncheckedGetPool<T>(this EcsWorld self) where T : IEcsHybridComponent
|
public static EcsHybridPool<T> GetPoolUnchecked<T>(this EcsWorld self) where T : IEcsHybridComponent
|
||||||
{
|
{
|
||||||
return self.UncheckedGetPool<EcsHybridPool<T>>();
|
return self.GetPoolUnchecked<EcsHybridPool<T>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
@ -255,6 +255,35 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
return self.Optional<EcsHybridPool<T>>();
|
return self.Optional<EcsHybridPool<T>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsHybridPool<T> GetHybridPool<T>(this EcsWorld self) where T : IEcsHybridComponent
|
||||||
|
{
|
||||||
|
return self.GetPool<EcsHybridPool<T>>();
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsHybridPool<T> GetHybridPoolUnchecked<T>(this EcsWorld self) where T : IEcsHybridComponent
|
||||||
|
{
|
||||||
|
return self.GetPoolUnchecked<EcsHybridPool<T>>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsHybridPool<T> IncludeHybrid<T>(this EcsAspectBuilderBase self) where T : IEcsHybridComponent
|
||||||
|
{
|
||||||
|
return self.Include<EcsHybridPool<T>>();
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsHybridPool<T> ExcludeHybrid<T>(this EcsAspectBuilderBase self) where T : IEcsHybridComponent
|
||||||
|
{
|
||||||
|
return self.Exclude<EcsHybridPool<T>>();
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsHybridPool<T> OptionalHybrid<T>(this EcsAspectBuilderBase self) where T : IEcsHybridComponent
|
||||||
|
{
|
||||||
|
return self.Optional<EcsHybridPool<T>>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class EcsWorld
|
public partial class EcsWorld
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
@ -194,9 +195,9 @@ namespace DCFApixels.DragonECS
|
|||||||
return self.GetPool<EcsPool<TComponent>>();
|
return self.GetPool<EcsPool<TComponent>>();
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static EcsPool<TComponent> UncheckedGetPool<TComponent>(this EcsWorld self) where TComponent : struct, IEcsComponent
|
public static EcsPool<TComponent> GetPoolUnchecked<TComponent>(this EcsWorld self) where TComponent : struct, IEcsComponent
|
||||||
{
|
{
|
||||||
return self.UncheckedGetPool<EcsPool<TComponent>>();
|
return self.GetPoolUnchecked<EcsPool<TComponent>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
@ -202,9 +202,9 @@ namespace DCFApixels.DragonECS
|
|||||||
return self.GetPool<EcsTagPool<TTagComponent>>();
|
return self.GetPool<EcsTagPool<TTagComponent>>();
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static EcsTagPool<TTagComponent> UncheckedGetPool<TTagComponent>(this EcsWorld self) where TTagComponent : struct, IEcsTagComponent
|
public static EcsTagPool<TTagComponent> GetPoolUnchecked<TTagComponent>(this EcsWorld self) where TTagComponent : struct, IEcsTagComponent
|
||||||
{
|
{
|
||||||
return self.UncheckedGetPool<EcsTagPool<TTagComponent>>();
|
return self.GetPoolUnchecked<EcsTagPool<TTagComponent>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
@ -222,5 +222,34 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
return self.Optional<EcsTagPool<TTagComponent>>();
|
return self.Optional<EcsTagPool<TTagComponent>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsTagPool<TTagComponent> GetTagPool<TTagComponent>(this EcsWorld self) where TTagComponent : struct, IEcsTagComponent
|
||||||
|
{
|
||||||
|
return self.GetPool<EcsTagPool<TTagComponent>>();
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsTagPool<TTagComponent> GetTagPoolUnchecked<TTagComponent>(this EcsWorld self) where TTagComponent : struct, IEcsTagComponent
|
||||||
|
{
|
||||||
|
return self.GetPoolUnchecked<EcsTagPool<TTagComponent>>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsTagPool<TTagComponent> IncludeTag<TTagComponent>(this EcsAspectBuilderBase self) where TTagComponent : struct, IEcsTagComponent
|
||||||
|
{
|
||||||
|
return self.Include<EcsTagPool<TTagComponent>>();
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsTagPool<TTagComponent> ExcludeTag<TTagComponent>(this EcsAspectBuilderBase self) where TTagComponent : struct, IEcsTagComponent
|
||||||
|
{
|
||||||
|
return self.Exclude<EcsTagPool<TTagComponent>>();
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static EcsTagPool<TTagComponent> OptionalTag<TTagComponent>(this EcsAspectBuilderBase self) where TTagComponent : struct, IEcsTagComponent
|
||||||
|
{
|
||||||
|
return self.Optional<EcsTagPool<TTagComponent>>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user