Exemplo n.º 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;
        }
Exemplo n.º 2
0
        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;
        }