Releases: genaray/Arch.Extended
Releases · genaray/Arch.Extended
1.0.8
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.
1.0.5
1.0.1
New Features
Update
attribute is nowQuery
.- Improved query performance by caching the
Query
struct. - Queries can now be generated for every partial class.
[Data]
attributes which mark parameters being passed to the generated query.- Generated querys now require a World and
Data
parameters as params.
New generated queries
[Query]
public void MoveEntity([Data] in float time, ref Position pos, ref Velocity vel){
pos.X += time * vel.X;
pos.Y += time * vel.Y;
}
// Somewhere else where the method is acessable
MoveEntityQuery(someWorld, someTime); // Call the generated method, multiple "[Data]" sources are allowed.