20 lines
391 B
C#
20 lines
391 B
C#
|
using System.ComponentModel;
|
||
|
using ExampleWorld;
|
||
|
|
||
|
namespace LyraApi.Ecs;
|
||
|
|
||
|
public class View
|
||
|
{
|
||
|
internal List<ComponentInfo> infos;
|
||
|
|
||
|
private View(List<ComponentInfo> infos)
|
||
|
{
|
||
|
this.infos = infos;
|
||
|
}
|
||
|
|
||
|
public static View Create<T1>() where T1 : IComponent
|
||
|
{
|
||
|
List<ComponentInfo> infos = [ComponentInfo.FromType<T1>()];
|
||
|
return new View(infos);
|
||
|
}
|
||
|
}
|