mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
Using the "event" keyword DOESN'T require the use of EventArgs derived classes as part of the method signature. Events provide a (standard) layer of safety by preventing the nulling or complete reassignment. It restricts external class interaction with the event to subscription with the += operator and unsubscription with the -= operator. This prevents unrelated objects from accidentally unsubscribing other objects from the event. The null check is still required though. For people who followed the examples, worked with the original events and only used += to subscribe to events, this change shouldn't affect client code at all.
Description
Languages
C#
20.3%
HTML
17%
C++
16.6%
C
10.4%
TypeScript
9.1%
Other
26.4%