Visne and GitHub
a5be8e723e
Remove some unused obsolete stuff ( #2049 )
2021-09-20 10:59:50 +02:00
e5013d9e3f
Add support for struct directed events, add by-ref directed/broadcast events. ( #1931 )
...
* Add support for struct directed events.
- Turn transform events into readonly structs
* TransformComponent events have readonly fields.
* Reduce boxing allocations, add DirectedRegistration readonly struct.
* Use typeof in a few places instead of GetType
* Add overloads to allow passing directed events by ref.
* Raise transform events by ref.
* Fix occluder AnchorStateChangedEvent subscription
* Fix broadphase subscriptions
* Fix bug oops
* Fix transform system raising moveevents by value
* Don't reflect the test entity systems.
* Directed EventBus uses ref everywhere, internally
Deduplicates a bunch of code. Whoo!
* Add broadcast by-ref events
* Fix by-ref events bug using Unsafe, add new tests for sorted by-ref events.
* Port broadcast events to by-ref.
* Speed, more correctness, reduce generics bloat.
* Clean up subscription code some.
* Remove bad test.
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com >
2021-08-21 11:37:02 +02:00
Pieter-Jan Briers
a35a5e1645
Add EntitySystem.Subs property to aid helper methods.
2021-07-29 01:51:51 +02:00
Pieter-Jan Briers
72314a102d
EventBus improvements
...
Can do ordered session event subscription.
Can subscribe to "All" in one call, to reduce shared boilerplate.
2021-07-21 00:56:42 +02:00
Pieter-Jan Briers and GitHub
fa0d4da6d1
Implement subscription ordering into EventBus. ( #1823 )
...
* Implement subscription ordering into EventBus.
* Topological helpers, rest of code uses shared topological sort, fix bugs.
* Fix tests.
Didn't realize that multi-subscriptions are allowed on input handlers like that??
* Improve and use topological sort helpers more.
2021-06-14 21:34:30 +02:00
Pieter-Jan Briers and GitHub
96c0a4ae1f
Automatically unsubscribe event bus registrations in entity system shutdown. ( #1758 )
...
* Automatically unsubscribe event bus registrations in entity system shutdown.
* Fix incorrect unsubscription of local events, obsolete unsubscribe methods.
That's what we got tests for.
* = null instead of .Clear()
2021-05-17 11:01:22 +02:00