This shows you the differences between two versions of the page.
pjv:laboratoare:2024:a02 [2024/10/21 14:53] andrei.lapusteanu |
pjv:laboratoare:2024:a02 [2024/10/23 08:45] (current) maria_anca.balutoiu [Sisteme de evenimente] |
||
---|---|---|---|
Line 248: | Line 248: | ||
| | ||
// Unsubscribe from the event (stop listening). | // Unsubscribe from the event (stop listening). | ||
- | private void OnDisable() => player.OnPlayerHealthChanged += HandlePlayerHealthChanged; | + | private void OnDisable() => player.OnPlayerHealthChanged -= HandlePlayerHealthChanged; |
// Method which is called on event invocation | // Method which is called on event invocation |