Closed BeanCheeseBurrito closed 10 months ago
This PR rewrites the query APIs to more closely match their C++ counterparts. These changes will reduce boilerplate and improve code readability of user code.
Before:
world.Routine( name: "MoveSystem", filter: world.FilterBuilder<Position, Velocity, Gravity>() .TermAt(1).Second<Local>() .TermAt(3).Singleton(), query: world.QueryBuilder() .OrderBy(...) .GroupBy(...), routine: world.RoutineBuilder() .Kind(Ecs.OnUpdate) .MultiThreaded(), callback: (ref Position p, ref Velocity v, ref Gravity) => { } );
After:
world.Routine<Position, Velocity, Gravity>("MoveSystem") .TermAt(1).Second<Local>() .TermAt(3).Singleton() .OrderBy(...) .GroupBy(...) .Kind(Ecs.OnUpdate) .MultiThreaded() .Each((ref Position p, ref Velocity v, ref Gravity) => { });
This PR rewrites the query APIs to more closely match their C++ counterparts. These changes will reduce boilerplate and improve code readability of user code.
Before:
After: