BeanCheeseBurrito / Flecs.NET

A C# wrapper for flecs
MIT License
145 stars 18 forks source link

Add Entity and Id extension code generator #66

Open BeanCheeseBurrito opened 2 days ago

BeanCheeseBurrito commented 2 days ago

There should be a code generator that generates wrappers around the Entity and Id structs for objects that inherit from them. It would make the following code a bit nicer to write.

// Entity builder functions need to be accessed through Component.Entity world.Component().Entity .Add(...) .Add(...);

- **New**
```cs
// Both component and entity functions should be accessible from the component struct
world.Component<Position>()
    .Ctor(...)
    .Dtor(...)
    .Add(...)
    .Add(...);