This commit is contained in:
Mikhail 2023-04-21 03:46:51 +08:00
parent 3a15b93da5
commit b38d59ae80
4 changed files with 10 additions and 10 deletions

View File

@ -100,7 +100,7 @@ namespace DCFApixels.DragonECS
}
public interface INotNullComponent { }
public static class INotNullComponentExt
public static class EcsNotNullPoolExt
{
public static EcsNotNullPool<TComponent> GetPool<TComponent>(this EcsWorld self)
where TComponent : struct, INotNullComponent

View File

@ -163,11 +163,11 @@ namespace DCFApixels.DragonECS
#endregion
}
public interface IComponent { }
public static class IComponentExt
public interface IEcsComponent { }
public static class EcsPoolExt
{
public static EcsPool<TComponent> GetPool<TComponent>(this EcsWorld self)
where TComponent : struct, IComparable
where TComponent : struct, IEcsComponent
{
return self.GetPool<TComponent, EcsPool<TComponent>>();
}

View File

@ -94,12 +94,12 @@ namespace DCFApixels.DragonECS
}
public interface ISingleComponent { }
public static class ISingleComponentExt
public static class EcsSinglePoolExt
{
public static EcsTagPool<TSingleComponent> GetPool<TSingleComponent>(this EcsWorld self)
public static EcsSinglePool<TSingleComponent> GetPool<TSingleComponent>(this EcsWorld self)
where TSingleComponent : struct, ISingleComponent
{
return self.GetPool<TSingleComponent, EcsTagPool<TSingleComponent>>();
return self.GetPool<TSingleComponent, EcsSinglePool<TSingleComponent>>();
}
}
}

View File

@ -73,11 +73,11 @@ namespace DCFApixels.DragonECS
#endregion
}
public interface ITagComponent { }
public static class ITagComponentExt
public interface IEcsTagComponent { }
public static class EcsTagPoolExt
{
public static EcsTagPool<TTagComponent> GetPool<TTagComponent>(this EcsWorld self)
where TTagComponent : struct, ITagComponent
where TTagComponent : struct, IEcsTagComponent
{
return self.GetPool<TTagComponent, EcsTagPool<TTagComponent>>();
}