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