Changes
Arch.System.SourceGeneration
was renamed toArch.System
, non generic Attributes lie within that space now.Entity
query method param now can be named however you want.- Some small tweaks and refactorings.
New Features
- Introduction of
Arch.EventBus
, a basic source generated eventbus for maximal performance.
EventBus
The EventBus is great for decoupling logic in a high-performant way.
The best thing is... it does not require reflection nor any dictionary lookups... and the calls can be inlined and therefore have the best possible speed.
[Event(order: ...)]
public static void OnShootFireBullets(ref ShootEvent event){ // ref, none, in supported and all types as a event. Only one param!
// Do stuff
}
[Event(order: ...)]
public static void OnShootUpdateNetwork(ref ShootEvent event){
// Do stuff
}
...
var shootEvent = ...;
EventBus.Send(ref shootEvent); // Broadcasts the event to all annotated static methods wherever they are.