コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: MapEvents.cs プロジェクト: Killers0992/EXILED
        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;
        }