mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
rename aspect builder methods
This commit is contained in:
parent
5ee538fc82
commit
68d6d0762a
@ -7,7 +7,7 @@
|
||||
public readonly TPool pool;
|
||||
public SingleAspect(Builder b)
|
||||
{
|
||||
pool = b.Include<TPool>();
|
||||
pool = b.IncludePool<TPool>();
|
||||
}
|
||||
}
|
||||
public sealed class CombinedAspect<A0, A1> : EcsAspect
|
||||
|
@ -104,19 +104,19 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
|
||||
#region Include/Exclude/Optional/Combine
|
||||
public TPool Include<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
public TPool IncludePool<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
{
|
||||
var pool = _world.GetPoolInstance<TPool>();
|
||||
IncludeImplicit(pool.ComponentType);
|
||||
return pool;
|
||||
}
|
||||
public TPool Exclude<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
public TPool ExcludePool<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
{
|
||||
var pool = _world.GetPoolInstance<TPool>();
|
||||
ExcludeImplicit(pool.ComponentType);
|
||||
return pool;
|
||||
}
|
||||
public TPool Optional<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
public TPool OptionalPool<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
{
|
||||
return _world.GetPoolInstance<TPool>();
|
||||
}
|
||||
@ -147,9 +147,9 @@ namespace DCFApixels.DragonECS
|
||||
#endif
|
||||
private void SupportReflectionHack<TPool>() where TPool : IEcsPoolImplementation, new()
|
||||
{
|
||||
Include<TPool>();
|
||||
Exclude<TPool>();
|
||||
Optional<TPool>();
|
||||
IncludePool<TPool>();
|
||||
ExcludePool<TPool>();
|
||||
OptionalPool<TPool>();
|
||||
IncludeImplicit(null);
|
||||
ExcludeImplicit(null);
|
||||
}
|
||||
|
@ -269,17 +269,17 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> Include<TComponent>(this EcsAspect.Builder self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.Include<EcsPool<TComponent>>();
|
||||
return self.IncludePool<EcsPool<TComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> Exclude<TComponent>(this EcsAspect.Builder self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.Exclude<EcsPool<TComponent>>();
|
||||
return self.ExcludePool<EcsPool<TComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsPool<TComponent> Optional<TComponent>(this EcsAspect.Builder self) where TComponent : struct, IEcsComponent
|
||||
{
|
||||
return self.Optional<EcsPool<TComponent>>();
|
||||
return self.OptionalPool<EcsPool<TComponent>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -250,17 +250,17 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> Include<TTagComponent>(this EcsAspect.Builder self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Include<EcsTagPool<TTagComponent>>();
|
||||
return self.IncludePool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> Exclude<TTagComponent>(this EcsAspect.Builder self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Exclude<EcsTagPool<TTagComponent>>();
|
||||
return self.ExcludePool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> Optional<TTagComponent>(this EcsAspect.Builder self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Optional<EcsTagPool<TTagComponent>>();
|
||||
return self.OptionalPool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
@ -279,17 +279,17 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> IncludeTag<TTagComponent>(this EcsAspect.Builder self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Include<EcsTagPool<TTagComponent>>();
|
||||
return self.IncludePool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> ExcludeTag<TTagComponent>(this EcsAspect.Builder self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Exclude<EcsTagPool<TTagComponent>>();
|
||||
return self.ExcludePool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static EcsTagPool<TTagComponent> OptionalTag<TTagComponent>(this EcsAspect.Builder self) where TTagComponent : struct, IEcsTagComponent
|
||||
{
|
||||
return self.Optional<EcsTagPool<TTagComponent>>();
|
||||
return self.OptionalPool<EcsTagPool<TTagComponent>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user