Turn interaction related attempt events into structs (#29168)

* Turn InteractionAttemptEvent into a struct event

* readonly

* GettingInteractedWithAttemptEvent

* ConsciousAttemptEvent
This commit is contained in:
Leon Friedrich
2024-06-19 02:30:41 +12:00
committed by GitHub
parent db30b5e040
commit ee2c115e5b
13 changed files with 80 additions and 37 deletions

View File

@@ -495,7 +495,7 @@ public sealed class DragDropSystem : SharedDragDropSystem
// CanInteract() doesn't support checking a second "target" entity.
// Doing so manually:
var ev = new GettingInteractedWithAttemptEvent(user, dragged);
RaiseLocalEvent(dragged, ev, true);
RaiseLocalEvent(dragged, ref ev);
if (ev.Cancelled)
return false;