mirror of
https://github.com/DCFApixels/DragonECS-AutoInjections.git
synced 2025-09-18 05:04:35 +08:00
add AutoInjectModule
This commit is contained in:
parent
235b450f1a
commit
73c10e98ca
@ -2,9 +2,18 @@
|
|||||||
{
|
{
|
||||||
public static class AutoInjectSystemExtensions
|
public static class AutoInjectSystemExtensions
|
||||||
{
|
{
|
||||||
|
[MetaColor(MetaColor.DragonCyan)]
|
||||||
|
public class AutoInjectModule : IEcsModule
|
||||||
|
{
|
||||||
|
public bool isAgressiveInjection;
|
||||||
|
public void Import(EcsPipeline.Builder b)
|
||||||
|
{
|
||||||
|
b.AddUnique(new AutoInjectSystem(isAgressiveInjection));
|
||||||
|
}
|
||||||
|
}
|
||||||
public static EcsPipeline.Builder AutoInject(this EcsPipeline.Builder self, bool isAgressiveInjection = false)
|
public static EcsPipeline.Builder AutoInject(this EcsPipeline.Builder self, bool isAgressiveInjection = false)
|
||||||
{
|
{
|
||||||
self.Add(new AutoInjectSystem(isAgressiveInjection));
|
self.AddUnique(new AutoInjectSystem(isAgressiveInjection));
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user