genaray / Arch.Extended

Extensions for Arch with some useful features like Systems, Source Generator and Utils.
Apache License 2.0
152 stars 35 forks source link

Is it possible to remove the world parameter from the constructor of basesystem? #27

Open Shadowblitz16 opened 1 year ago

Shadowblitz16 commented 1 year ago

It would be nice if we didn't need to define a constructor when inheriting BaseSystem

genaray commented 1 year ago

Do you mean in the source-gen or just the basic BaseSystem? ^^ Its possible of course, can add that fairly easy :)

Shadowblitz16 commented 1 year ago

Do you mean in the source-gen or just the basic BaseSystem? ^^ Its possible of course, can add that fairly easy :)

I mean in the BaseSystem.

Internally passing it to BaseSystem when it's created was what I was thinking

genaray commented 12 months ago

Do you mean in the source-gen or just the basic BaseSystem? ^^ Its possible of course, can add that fairly easy :)

I mean in the BaseSystem.

Internally passing it to BaseSystem when it's created was what I was thinking

Im just looking at it. I could make the World property public and add a empty ctor. This way one could create a basesystem without a world and set the world afterwards.

Would this be enough?

Shadowblitz16 commented 11 months ago

This would probably be enough I am trying to make a very simple, fast and safe wrapper around arch so this would probably do