Skip to content

1.0.8

Latest
Compare
Choose a tag to compare
@genaray genaray released this 13 Mar 00:15
· 199 commits to master since this release
77b2f49

Changes

  • Arch.System.SourceGeneration was renamed to Arch.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.