public static void InvokeDoorInteract(GameObject player, Door door, ref bool allow) { if (DoorInteractEvent == null) { return; } DoorInteractionEvent ev = new DoorInteractionEvent() { Player = player.GetPlayer(), Allow = allow, Door = door }; DoorInteractEvent.Invoke(ref ev); allow = ev.Allow; }
public static void InvokeDoorInteract(GameObject player, Door door, ref bool allow) { OnDoorInteract onDoorInteract = DoorInteractEvent; if (onDoorInteract == null) { return; } DoorInteractionEvent ev = new DoorInteractionEvent() { Player = Player.GetPlayer(player), Allow = allow, Door = door }; onDoorInteract?.Invoke(ref ev); allow = ev.Allow; }