genaray / Arch

A high-performance C# based Archetype & Chunks Entity Component System (ECS) with optional multithreading.
Apache License 2.0
1.04k stars 89 forks source link

Better systems #233

Open Shadowblitz16 opened 2 months ago

Shadowblitz16 commented 2 months ago
var world = World.Create();
world.AddSystem(PlayerMoveSystem)

public static void PlayerMoveSystem((Transform Transform,  PlayerMovement Movement)[] components)
{
    foreach (var component in components)
    { 
        component.Transform.Position += component.Movement.Velocity;
    }
}
genaray commented 2 months ago

Have you looked at https://github.com/genaray/Arch.Extended/wiki/Source-Generator ? I would argue that its way better than bevy like systems tho :)

Shadowblitz16 commented 2 months ago

Does it really require a constructor?