lyra-wasm-scripting-test/guests/csharp/dotnet-guest-test/LyraApi/Ecs/View.cs

20 lines
391 B
C#
Raw Normal View History

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);
}
}