mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
add simplified UncheckedGetPool for built-in pools
This commit is contained in:
parent
a11c7de42c
commit
5612fe047c
@ -198,19 +198,28 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public static class EcsHybridPoolExt
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsHybridPool<T> GetPool<T>(this EcsWorld self) where T : IEcsHybridComponent
|
||||
{
|
||||
return self.GetPool<EcsHybridPool<T>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsHybridPool<T> UncheckedGetPool<T>(this EcsWorld self) where T : IEcsHybridComponent
|
||||
{
|
||||
return self.UncheckedGetPool<EcsHybridPool<T>>();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsHybridPool<T> Include<T>(this EcsAspectBuilderBase self) where T : IEcsHybridComponent
|
||||
{
|
||||
return self.Include<EcsHybridPool<T>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsHybridPool<T> Exclude<T>(this EcsAspectBuilderBase self) where T : IEcsHybridComponent
|
||||
{
|
||||
return self.Exclude<EcsHybridPool<T>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsHybridPool<T> Optional<T>(this EcsAspectBuilderBase self) where T : IEcsHybridComponent
|
||||
{
|
||||
return self.Optional<EcsHybridPool<T>>();
|
||||
|
@ -191,19 +191,28 @@ namespace DCFApixels.DragonECS
|
||||
public interface IEcsComponent { }
|
||||
public static class EcsPoolExt
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> GetPool<TComponent>(this EcsWorld self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.GetPool<EcsPool<TComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> UncheckedGetPool<TComponent>(this EcsWorld self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.UncheckedGetPool<EcsPool<TComponent>>();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> Include<TComponent>(this EcsAspectBuilderBase self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.Include<EcsPool<TComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> Exclude<TComponent>(this EcsAspectBuilderBase self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.Exclude<EcsPool<TComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> Optional<TComponent>(this EcsAspectBuilderBase self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.Optional<EcsPool<TComponent>>();
|
||||
|
@ -186,19 +186,28 @@ namespace DCFApixels.DragonECS
|
||||
public interface IEcsTagComponent { }
|
||||
public static class EcsTagPoolExt
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> GetPool<TTagComponent>(this EcsWorld self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.GetPool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> UncheckedGetPool<TTagComponent>(this EcsWorld self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.UncheckedGetPool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> Include<TTagComponent>(this EcsAspectBuilderBase self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Include<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> Exclude<TTagComponent>(this EcsAspectBuilderBase self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Exclude<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> Optional<TTagComponent>(this EcsAspectBuilderBase self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Optional<EcsTagPool<TTagComponent>>();
|
||||
|
Loading…
Reference in New Issue
Block a user