de4d255841
Analyzer to enforce classes to be either [Virtual], abstract, or sealed. ( #2469 )
...
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com >
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com >
2022-02-05 19:31:58 +01:00
Vera Aguilera Puerto and GitHub
a54283e637
ByRefEvent attribute for events. ( #2375 )
2021-12-27 17:59:32 +01:00
Pieter-Jan Briers
baf86b5b83
Get rid of ComponentTypeCache stuff.
...
It didn't really work.
2021-12-23 01:15:25 +01:00
wrexbe and GitHub
c94e49ed08
Cache Component Types ( #2325 )
2021-12-12 16:06:51 -08:00
DrSmugleaf
163deff564
Fix 3000 errors
2021-12-05 18:13:33 +01:00
Vera Aguilera Puerto
5eda1b326d
Inline OwnerUid
2021-12-03 16:30:34 +01:00
Vera Aguilera Puerto
079e099a3b
Makes many things use OwnerUid instead of Owner.Uid
2021-11-09 15:11:02 +01:00
Vera Aguilera Puerto
e2c7d95519
Don't make SubscriptionsEnumerator nullable for no good reason.
2021-10-02 11:28:38 +02:00
Vera Aguilera Puerto
0e6c00573f
EventTables' "TryGetSubscriptions" doesn't throw anymore when it can't find the uid on the event tables.
2021-10-02 11:26:38 +02:00
Vera Aguilera Puerto and GitHub
fbcdd63988
Gets rid of most ComponentManager usages. ( #2076 )
...
- Obsoletes more `ComponentManager` fields/properties.
2021-09-28 13:36:18 +02:00
Vera Aguilera Puerto
15778d3af4
Fix some warnings regarding IComponentManager.
2021-09-28 12:41:49 +02:00
Vera Aguilera Puerto and GitHub
051d47f4ff
Adds ComponentGetState ECS event ( #1988 )
2021-08-29 17:23:40 +02:00
Vera Aguilera Puerto and GitHub
84b7742656
Adds by-ref and struct event support to ComponentEvents ( #1987 )
2021-08-29 16:52:38 +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
aa44b1cb8a
RaiseLocalEvent non-generic overload that checks for GetType() ( #1907 )
...
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com >
2021-07-29 13:30:29 +02:00
metalgearsloth and GitHub
ba40185179
Make entitylookup grid-relative ( #1849 )
...
* Refactor entitylookups to be 30% more based
* Refactor gucci
* Done?
* Fix most tests
* nothing suss
* Vera single-handedly saving shuttles
* fex
* Copy lookup from shuttles
* sys
* comp recursion
2021-07-12 13:39:02 +02:00
Pieter-Jan Briers
db4d787b49
use a struct enumerator for EventTables GetReferences.
2021-06-20 18:50:43 +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
Vera Aguilera Puerto and GitHub
65357ee8da
ComponentHandleState event ( #1778 )
2021-06-12 15:50:27 +02:00
Vera Aguilera Puerto and GitHub
7ad5ce302e
Directed event improvements ( #1761 )
...
* IComponentManager holds a reference to IComponentFactory.
* Directed events for a same <TComp, TEvent> can be duplicated, component references of a component are added to the entity's event tables.
* Fix tests.
* Improvements, duplicated subscriptions are no more
* Cache component factory for faster access
* when the
2021-05-21 17:38:52 -07:00
Acruid
7899780543
Unsubscribing from a directed entity event does not require a delegate argument anymore.
2021-05-02 14:23:48 -07:00
Vera Aguilera Puerto
ef2c0ad8cf
Fix the comp lifetime ComponentRemove event
...
Now, event tables DispatchComponent takes in the component reference directly.
2021-04-30 01:09:50 +02:00
Acruid and GitHub
cbd7b62ad7
Component Lifetime Events ( #1660 )
...
* Events are now raised for component OnAdd/Initialize/Startup/Shutdown/OnRemove.
Code cleanup in the Component class.
2021-04-13 17:16:41 -07:00
Acruid and GitHub
f7e8178736
Added new ComponentEvents system in IEventBus. ( #1601 )
...
* Added new ComponentEventBus, combined it with IEventBus.
* Removed all traces of IEntity from ComponentDependencies.
Removed IEntityManager dependency from ComponentManager.
* Added entity create/delete events to IEntityManager.
* ComponentEvents now use EntitySystemMessages instead of their custom ComponentEvent class.
* Component events are now just overloads of entity events.
* Removed obsolete EntitySystemMessage, now everything uses the base EntityEventArgs.
* Add a bool argument for if the message should be broadcast as well as directed.
Fix ordering and init issues of events in EntityManager.
* Changed names from Component/Entity events to Directed/Broadcast.
* Fix bugs and unit tests.
2021-03-09 11:02:24 -08:00