public static void InvokeLockerInteract(GameObject player, Locker locker, int lockerId, ref bool allow) { if (LockerInteractEvent == null) { return; } LockerInteractionEvent ev = new LockerInteractionEvent(player.GetPlayer(), locker, lockerId) { Allow = allow, }; LockerInteractEvent.Invoke(ev); allow = ev.Allow; }
internal static void InvokeLockerInteract(GameObject gameObject, Locker locker, int lockerid, ref bool allow) { OnLockerInteract onLockerInteract = LockerInteractEvent; if (onLockerInteract == null) { return; } LockerInteractionEvent ev = new LockerInteractionEvent(Player.GetPlayer(gameObject), locker, lockerid) { Allow = allow, }; onLockerInteract?.Invoke(ev); allow = ev.Allow; }