mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
fix EcsModule
This commit is contained in:
parent
fdb691095f
commit
09254c5919
@ -231,12 +231,9 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
void Import(EcsPipeline.Builder b);
|
void Import(EcsPipeline.Builder b);
|
||||||
}
|
}
|
||||||
public abstract class EcsModule : IEcsModule
|
public abstract class EcsModule<T> : IEcsModule, IInjectionUnit
|
||||||
{
|
{
|
||||||
public abstract void Import(EcsPipeline.Builder b);
|
public abstract void Import(EcsPipeline.Builder b);
|
||||||
}
|
|
||||||
public abstract class EcsModule<T> : IInjectionUnit
|
|
||||||
{
|
|
||||||
void IInjectionUnit.InitInjectionNode(InjectionGraph nodes) { nodes.AddNode<T>(); }
|
void IInjectionUnit.InitInjectionNode(InjectionGraph nodes) { nodes.AddNode<T>(); }
|
||||||
public EcsModule() { if (GetType() != typeof(T)) { Throw.UndefinedException(); } }
|
public EcsModule() { if (GetType() != typeof(T)) { Throw.UndefinedException(); } }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user